-
Notifications
You must be signed in to change notification settings - Fork 6
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
Formula depends on Go for building #16
Comments
Hi 👋 - while I know very little about homebrew, I've discussed this with the team and we'd be open to the change if you're happy to implement. |
I found that after installing buf with homebrew, my default go version got changed! Earlier installed version 1.23.3, and after installing buf, the default version of go that is picked up now is 1.23.4 Found this issue, as this could indeed be a problem especially when you don't want your go version to be updated because you were just installing or updating buf... The reason the default go version that is picked up has changed on my machine is simply because homebrew puts it environment path in front of the default earlier set go-path (in the $PATH variable). On linux/ubuntu when in a shell executing while my go installation is in the default install folder asking that version gives:
instead of the brew formula installed version 1.23.4 Of course, this minor difference on my machine is not that much of an issue, but in general a whole team could want to make a careful decision before upgrading from one go version to the next, even when installing buf as proto linter. So, updating the go version from installing buf is not something that should happen; when we accidentally move developers to a different default go-version after installing buf, this could lead to issues when different developers suddenly use different go versions, right? |
This formula depends on Go for building.
It means that it installs
go
from thestable
channel and leaves it there after installing buf, which is not really necessary.It also means that it creates confusion regrading which is the "correct" Go binary, if another Go version is installed (e.g.
go@1.18
from brew) or Go is installed in other way (e.g. downloaded from https://go.dev/dl/).I believe it's possible to change this formula so it just downloads the pre-built binary from https://github.com/bufbuild/buf/releases, at least for explicitly for linux and macOS (can still install Go and build from source otherwise, to avoid losing comptability for non-linux-and-macOS-OSes). I think it should also make the formula installation faster and more reliable (why build from source on every installation if we can use the officially-released pre-built binary?).
If you agree with my suggestion, I'd love to submit a PR that does that.
The text was updated successfully, but these errors were encountered: