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

Isolate golang tool dependencies #18867

Closed
silverwind opened this issue Feb 23, 2022 · 0 comments · Fixed by #18874
Closed

Isolate golang tool dependencies #18867

silverwind opened this issue Feb 23, 2022 · 0 comments · Fixed by #18874

Comments

@silverwind
Copy link
Member

silverwind commented Feb 23, 2022

Tool dependencies are currently installed as global commands via the Makefile via block like this:

@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
  $(GO) install mvdan.cc/[email protected]; \
fi

This present the issue that once installed, a tool will never update without manual intervention and it makes it very hard to work on multiple projects or even branches with different tool versions.

golang/go#25922 (comment) shows a few possible solutions. Might be worth a try with bingo which seems to promise a lot, but I'm not sure it actually delivers.

silverwind added a commit to silverwind/gitea that referenced this issue Mar 2, 2022
This ensures the tools only run in the versions we've tested and it also
does not polute PATH with those tools so they are truly isolated. This
syntax of `go run` requires go 1.17, so the minimum version is set
accordingly.

Fixes: go-gitea#18867
techknowlogick added a commit that referenced this issue Mar 16, 2022
This ensures the tools only run in the versions we've tested and it also
does not polute PATH with those tools so they are truly isolated. This
syntax of `go run` requires go 1.17, so the minimum version is set
accordingly.

Fixes: #18867

Co-authored-by: techknowlogick <[email protected]>
richmahn pushed a commit to unfoldingWord/dcs that referenced this issue Mar 17, 2022
This ensures the tools only run in the versions we've tested and it also
does not polute PATH with those tools so they are truly isolated. This
syntax of `go run` requires go 1.17, so the minimum version is set
accordingly.

Fixes: go-gitea/gitea#18867

Co-authored-by: techknowlogick <[email protected]>
techknowlogick added a commit to techknowlogick/gitea that referenced this issue Mar 18, 2022
This ensures the tools only run in the versions we've tested and it also
does not polute PATH with those tools so they are truly isolated. This
syntax of `go run` requires go 1.17, so the minimum version is set
accordingly.

Fixes: go-gitea#18867

Co-authored-by: techknowlogick <[email protected]>
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
This ensures the tools only run in the versions we've tested and it also
does not polute PATH with those tools so they are truly isolated. This
syntax of `go run` requires go 1.17, so the minimum version is set
accordingly.

Fixes: go-gitea#18867

Co-authored-by: techknowlogick <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant