Open cosmos72 opened 3 years ago
This might better be titled Having issues with third party packages and go1.16.3
Docker is just the way I chose to install it.
Well, I could not reproduce this issue on the following setups:
hence my guess that it's somehow related to the docker installation procedure
There is really nothing special about the docker installation procedure other than it starts with a clean slate. Would you be able to try with an empty GOPATH? Is it possible you're starting with a cache in place of some sort? Could it matter that this is using the Jupyter Notebook single-image?
There is really nothing special about the docker installation procedure other than it starts with a clean slate.
That's what puzzles me.
The sequence to load packages in module mode with Go >= 1.16 is quite convoluted:
go.mod
file in a new, empty directory// debug: running "go get github.com/davecgh/go-spew/spew" ...
go get pkg/full/path
in the directory created at 1golang.org/x/tools/go/packages/Load("pattern="+pkgpath)
pkgshortname.go
in the directory created at 1. The file contains all package's symbols retrieved at 4// debug: running "go mod tidy" ...
go mod tidy
in the directory created at 1// debug: compiling "pkg/full/path" ...
go build -buildmode=plugin
in the directory created at 1plugin/Open()
and plugin/Plugin.Lookup()
to load and use the pluginyour setup fails at step 4 because the echo at step 6 is not visible in your logs.
And golang.org/x/tools/go/packages/Load()
is a big black box that, among other things, internally executes the go
command.
@cosmos72 I was able to run third party with no much hassle when using your gomacro 0.7.3 after the recent update. However, I didn't use gophernotes/gophernotes
image, but rather mine. And all I change to make it working is to instal build-essentials (gcc/make/etc...).
Docekrfiles can be found here - https://github.com/butuzov/dots/tree/master/docker-images
@snowzach reported the following in https://github.com/cosmos72/gomacro/issues/109
I am not expert with docker, so I moved the issue here as it's about gophernotes + docker (I tested on a plain Linux installation of latest gophernotes without docker, and I could not reproduce this issue)
Any suggestion / help is appreciated.