Skip to content

plugin: doesn't work well with modules, requires coordinating dependency versions #43749

Open
@liurui-1

Description

@liurui-1

What version of Go are you using (go version)?

$ go version
go version go1.15.6 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/usr/local/go/bin/"
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ua/go/pkg/mod"
GONOPROXY="github.ibm.com/*"
GONOSUMDB="github.ibm.com/*"
GOOS="linux"
GOPATH="/home/ua/go"
GOPRIVATE="github.ibm.com/*"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build393178232=/tmp/go-build -gno-record-gcc-switches"

What did you do?

We have an app using a lot of Golang plugins developed by many teams. It works very well with Golang Dep.(https://github.com/golang/dep) because you do not need to care any compatibility issues caused by the new packages of the plugins and all those in the vendor directory because they are all independent.
While when we migrate to Go Modules, there are various compatibility issues. For most scenarios, we need to refine the shared projects and then we have to change all plugins developed by many teams. The workload is huge.
Though finally, we can fix the problem with various ways, the cost is too big so that we have to go back to Golang Dep.

What did you expect to see?

Like with Golang Dep, if we can build the GoLang plugin successfully, then we can load the plugin with the main app and all plugins can work together without any issue.

What did you see instead?

Right now, when we successfully build a GoLang plugin, it does not mean the plugin can be loaded and it does not mean it can work with other plugins. There will be various "different version of package" issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Unfortunate

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions