Hi Matt,

basically we need to be able to install some user plugins at runtime. I'm
not sure Go `plugin` is avoidable in this case...

- J

On Mon, Mar 19, 2018 at 3:57 AM, Matt Harden <matt.har...@gmail.com> wrote:

> Do you have to use plugins? I would avoid them whenever possible. What
> benefit do you expect to get from using them?
>
> On Sun, Mar 11, 2018 at 1:03 AM Jay Guo <guojiannan1...@gmail.com> wrote:
>
>> Bump.. any thoughts? Thanks!
>>
>> - J
>>
>>
>> On Thursday, March 8, 2018 at 2:03:37 PM UTC+8, Jay Guo wrote:
>>>
>>> Golang gurus,
>>>
>>> I'm currently trying to modularize my project with the help of Golang
>>> plugin, and I come across this dependency vendoring dilemma.
>>>
>>> Let's say we have a project layout:
>>>
>>>    - Two different projects in separate repo: `Host` and `Guest`
>>>    - `Host` depends on package `pkgA`
>>>    - `Guest` depends on package `pkgA` too
>>>    - `Guest` is compiled as plugin, and loaded by `Host`
>>>    - `pkgA` is vendored into both `Host` and `Guest`
>>>
>>> In this situation, `pkgA` would be loaded twice and independently,
>>> meaning there are two instance of the package in the program, one lives in
>>> `Guest` and one in `Host`. init() would be called twice as well
>>>
>>> Particularly, I'm dealing with golang.org/x/net/trace package, which
>>> actually registers an endpoint /debug/requests. The second attempt would
>>> panic because of double-registration.
>>>
>>> I'd appreciate any advice on how to manage common dependencies of plugin
>>> and main project, thank you!
>>>
>>> - J
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to golang-nuts+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to