-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: get -d k8s.io/kubernetes does not say what has happened #31926
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
Comments
I am sorry. I totally missed that go 1.13 is indeed making a breaking change to the behaviour of |
/cc @bcmills @jayconrod |
Did In your environment, it looks like you're running in module mode. When successful, If |
I run into this regularly. Speaking for myself, ‘go get -d’ succeeds...but my intent was to get the code in question so that I could play with it and read it locally. I was confused the first few times when I didn’t find it it my GOPATH. Now I sigh, and re-run with GO111MODULE=off. Is there a convenient way in module mode to just grab the code to mess around with it? (Note that ‘git clone’ is not an answer, because ‘go get’ understands things that are difficult to resolve manually—meta tags for custom domains, VCS resolution.) If not, maybe this issue is a feature request for that, somewhat analogous to the feature request for a global install command. (I’m on a phone so I don’t have the issue number handy.) |
I second what Josh said. I want to bring your attention to the interface. As for my case, the problem with I understand that many people here already get used to the new behavior of |
@josharian meant #30515. This is related too: #31529 |
That's arguably one of the use-cases for |
That's true, but I wonder how quickly folks will get used to it: I suppose that we could print some sort of informational message after a |
There is also #18387 ("cmd/go: provide a way to resolve an import path to a vcs, url, etc"). If the Alternatively, I suppose one could try to build something like that utility even now by doing something like:
(Perhaps a bonus would be an option for first determining the current version of the dependency in the current module via |
Does @rogpeppe's |
I think But |
That assumes you're working on a particular project. I'm usually kicking the tires/exploring something, not necessarily within a project. I could invent one, I suppose, and then make a Go file and add an import...but that seems like a lot of mechanism for something that used to be a one-liner that I used all the time.
Right now, it appears that gohack doesn't function outside a module. One could, of course, add it. But again, this used to be a frequent use built-in one-liner. I'm not sure that kicking it to external tools is the right idea. |
Instead of breaking the accustomed behavior of
from
Before it downloaded to Even using go mod by default, allow There's thousands of Go repos out there, with README.md docs instructing users to:
All those instructions are now broken when a user has |
Given how long modules have been in use, I suspect we've missed the window of opportunity to smooth out this migration. I think the remaining rough edge in the user experience is covered by #31529. |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Both of these commands:
What did you expect to see?
Some message of what has happened.
What did you see instead?
Something happened and no helpful message indicated what. I expected to see the repo from k8s.io/kubernetes to appear in my $GOPATH, but that never happened. And since it is the breaking change in
go get
I was triple confused, since there was not output at all.I also tried to see verbose output to get a clue what happened, but the output was not helpful either:
The text was updated successfully, but these errors were encountered: