You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We build apps and plugins in the following way to ensure best compatibility:
app and go plugin built with -trimpath
using a go workspace
An unfortunate side effect of that has lead us to #29525 ;
With using -trimpath, we can't load the same plugin twice. In order to diagnose the issue, we build 2 plugins:
+ go build -buildmode=plugin -o plugin.so
+ go build -buildmode=plugin -trimpath -o plugin-trimpath.so
The version built with -trimpath omitted local filesystem details, however, now there isn't a way to produce a unique plugin without modifications of the go.mod package;
without trimpath: /go/src/github.com/<vendor>/<folder>/test_goplugin.go
with trimpath: example.com/basic-plugin/test_goplugin.go (matching go.mod)
Is there a way to use -pluginpath to set the current plugin package being built explicitly? #19418
Could go plugins be considered similarly to dependencies without a go.mod? Creating a pseudoversion for the plugin name in the compiled output?
Is there some other way to make the plugin build unique, to allow for multiple loads?
I would like to avoid tinkering with the binary to inject some timestamp, ID or hash to ensure uniqueness.
What other avenues could be considered to ensure a plugin can be reloaded?
The text was updated successfully, but these errors were encountered:
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
We build apps and plugins in the following way to ensure best compatibility:
An unfortunate side effect of that has lead us to #29525 ;
With using
-trimpath
, we can't load the same plugin twice. In order to diagnose the issue, we build 2 plugins:The version built with
-trimpath
omitted local filesystem details, however, now there isn't a way to produce a unique plugin without modifications of the go.mod package;/go/src/github.com/<vendor>/<folder>/test_goplugin.go
example.com/basic-plugin/test_goplugin.go
(matching go.mod)Is there a way to use
-pluginpath
to set the current plugin package being built explicitly?#19418
Could go plugins be considered similarly to dependencies without a go.mod? Creating a pseudoversion for the plugin name in the compiled output?
Is there some other way to make the plugin build unique, to allow for multiple loads?
I would like to avoid tinkering with the binary to inject some timestamp, ID or hash to ensure uniqueness.
What other avenues could be considered to ensure a plugin can be reloaded?
The text was updated successfully, but these errors were encountered: