Isolate golang tool dependencies #8604

Closed
opened 2025-11-02 08:12:14 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @silverwind on GitHub (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/gofumpt@v0.3.0; \
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.

https://github.com/golang/go/issues/25922#issuecomment-1038394599 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.

Originally created by @silverwind on GitHub (Feb 23, 2022). Tool dependencies are currently installed as global commands via the Makefile via block like this: ```make @hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ $(GO) install mvdan.cc/gofumpt@v0.3.0; \ 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. https://github.com/golang/go/issues/25922#issuecomment-1038394599 shows a few possible solutions. Might be worth a try with [`bingo`](https://github.com/bwplotka/bingo) which seems to promise a lot, but I'm not sure it actually delivers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8604