On Thu, Feb 23, 2017 at 4:45 PM, 'Tim Hockin' via golang-nuts
<golang-nuts@googlegroups.com> wrote:
>
> I can't seem to find this documented, and I'm me involved in some
> conversations about using plugins:
>
> What guarantees or limitations surround plugins?  Can I compile a host
> program with go-1.8.0 and have a third-party plugin compiled with 1.8.1, and
> load it?
>
> Can I call methods on plugin-specific objects?
>
> Are there any concessions toward versioning?
>
> What happens if I add a method to a type in the host, but don't rebuild he
> plugin?
>
> Are functions/method calling conventions guaranteed to be consistent, or do
> compiler flags change that?

Plugins are definitely in an early stage, and there are many reported
bugs with using them in 1.8.

Plugins must be built with the exact same version of Go as is used to
build the main program.  If any package appears in both the main
program and a plugin, or in two loaded plugins, that package must be
built from the exact same source code in all cases.  There are no
current plans to lift these restrictions.  I believe these
restrictions are checked at run time, though there may be bugs.

You can call methods on types defined in a plugin, yes.  You'll
presumably be doing that using some sort of interface type.

There is nothing about versioning in the plugin package.  I don't
think anybody even knows what it would look like.

There are no compiler flags to change the calling convention.  If
there were any, they should cause a failure to load the plugin at run
time.

Ian

-- 
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