Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: `go install <path>` modifies current go.mod #26048
What version of Go are you using (
Modifying go.mod is OK. What's not OK is that the go.mod line for vgo/hello_world is blocking the addition of vgo/hello_world/v2. I have a CL coming soon to fix this.
@myitcv, sorry about the closed duplicate. #24749 and #24605 really are the same kind of issue but I inadvertently only fixed the latter (foo/...) and not the former (./...). Pending CL 122397 fixes the #24749 case.
I just decided to reconsider this issue about modifying
The issue with failing installation is fixed, so after running
we get this:
But what you do want from
So what's the point to modify the
And the next step in the logic chain, why do we need go.mod at all while running
I'm just a little bit confused with it, because I can understand why
referenced this issue
Jul 19, 2018
One use-case: if you're trying to debug a user-reported crash in some binary that uses your module, you might
To know what versions of modules to use when building the binary, and to know what versions were used when building the binary. (But see #24250 for the request to be able to install binaries at specific versions outside the context of a current module.)
You could use
I just want to install a binary, that's it. And now I can't just run
In order to install a binary to GOBIN I have to initialize a bogus
And the error
So what I'm trying to say, we have 2 types of project - library and binary.
It would be great to say then - "Use
We've all got used to run
P.S. I'm in love with new
And I'm issuing the questions, which could help me understand the reasoning under some decisions, so that I could explain it to the others and help to adopt new dependency management in my company and in the community.
We don't have a solid enough design for a concrete proposal yet (see #24250 (comment)).
If you want to sketch out the interactions and work out the details, please do make one: even if there's something missing, having a concrete proposal would give us a baseline to build on. (Even though #24250 and this issue exist, it's probably clearer to reset the discussion for a concrete proposal, and we can always mark things as duplicates.)