Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of 'go get' for recipes of type "go" is broken with golang 1.16+ #2856

Open
kscherer opened this issue Jan 7, 2022 · 0 comments
Open

Comments

@kscherer
Copy link
Contributor

kscherer commented Jan 7, 2022

I tried to install the go-company recipe and the installation failed in the byte compile stage because it couldn't find the elisp source. I did some research and with the golang 1.17 installed on my system the 'go get' command only supports "module" mode [1] and this breaks the code in el-get-go.el.

There are several related issues:

  1. 'go get' still builds the binary but this is deprecated and this functionality will be removed in newer versions

  2. 'go get' installs the source code in 666 mode by default which causes el-get-reinstall to fail because the code cannot be removed (permission denied solved by chmod -R +w). There isn't a 'go uninstall' command that will remove the code. I guess golang developers never delete modules...

  3. 'go get' in "module" mode integrates the module version into the download path. What used to be src/github.com/nsf/gocode/emacs-company is now pkg/mod/github.com/nsf/[email protected]/emacs-company/. This makes it hard to locate the source code in a version independent way.

I don't know golang well enough yet to know what the right way to handle this is. Maybe 'go get -d' followed by 'go build' (and chmod -R +w?) to create the binary and a separate step to clone the git repository for the elisp code?

[1]: Technically it was no longer the default in 1.16: https://github.com/golang/go/wiki/GOPATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant