Replies: 2 comments
-
Excellent write up, thank you. I agree that we need to change the zero install example to not use ignore. And we should clean up those issues so they're not spread all over. I really appreciate the time you've put into this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@natefinch, Can you assign me the issues I linked in this Discussion? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
There are several open issues related to installing, updating, or managing mage as a tool dependency. Some are resolved through previous updates to the repo READ.me and web content. Others are because of still outdated information in the repo.
I have collected what issues I could find to compile them in one place since they are all generally all related and can be resolved through updating the documentation. I also wanted to start the discussion about any potential docs change / updates.
I have also collected several issues related to managing go tools. This is more in reference to a few issues with the zero installation and updating mage.
Related Issues
Need Doc Update
Need Doc Update
Need Doc Update
Need Doc Update
Possibly related
Possibly related
Needs To Be Closed
Zero install and general tool management
One of the documented ways to use mage is the zero install method. Issue #325 has been open about updating the docs to not use the
ignore
build tag since go mod tidy does not evaluate files with that tag.This pattern is basically the recommended way to manage tool dependencies in Go for now (See link in Background section). It works for most use cases but there are several issues about edge cases that it does not:
It seem there is not any consensus on what is the current best practice, but I found some ideas at least:
go.tools.mod
file: cmd/go: clarify best practice for tool dependencies golang/go#25922 (comment)go run example.com/[email protected]
, which could be used in the Makefile (this seems to me to be the best approach, with the main downside being that golangci-lint version would be duplicated - in the Makefile and docker-compose.yml)While overall not everyone in go agrees, The recommended best practice is to use a tools.go as mentioned In the background section.
For now, IMO it would be best to reference the go wiki for tools in addition to documenting the bootstrap.go. Potential have a reference to here about possible changes to tool management that may affect the zero install option later.
I will try to keep this updated and spend some time this month writing the updated docs.
Beta Was this translation helpful? Give feedback.
All reactions