-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: confusion with module-aware get changes #26591
Comments
Maybe you want #26361. Or perhaps one of the existing
I think you want
|
From downloading code for existing dependencies, or from adding new dependencies? |
If I want to install an arbitrary command, like go get used to do, what do I do now? If I want to install an arbitrary command, without downloading anything (what go install used to do), what now? |
I find the new behavior confusing as well.
Is there a way to install arbitrary CLI tools with the go command any more, or do I have to git clone instead? |
@carlmjohnson yes you can use So if you want these tools to be generally available you could do something like:
Then:
Notice how you don't care what value is set for You might then also want to add the |
Doesn't work:
|
That's #24250. |
@carlmjohnson, |
My Go projects (including Boreas) all include these installation instructions in the README:
It looks like for Go 1.12, if #24250 doesn't happen, I will need to change the instructions to
Three lines instead of one is not the end of the world, but it would be nice if I could just say to run a single command. |
I think (per #26591 (comment)) this is covered by #24250; please shout if that's not the correct conclusion. |
Previously go get would check out code necessary to install something. With go modules, that changes. go install is now required to install something external to the current module. Go get will merely check out and add dependencies (so far as I can tell).
While the new behavior seems superior, it is surprising. I couldn't find any clarification on this. I'm also not sure how one would prevent go install from downloading code.
The text was updated successfully, but these errors were encountered: