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: why does go get -d -u
fail when go get -u
#11090
Comments
I get the same error message and failure exit every time if I add the -u option to the "go get" command:
Thanks, William |
This explains why I'm not sure why |
go get -d -u
fail when go get -u
My thinking was that without -d it should try to build, but with -d it should download only, so "go get -d" and "go get -d -u" should not have an error state if they download the repository. However, "go get" or "go get -u" should have the error state if they try to build. |
@adg: GOROOT is /usr/lib/go$ rm -fr /home/William/go Does all of this make sense? |
Yep, it makes sense. The fix is probably quite subtle. We might get it fixed for 1.5; let's see. |
I found a way around this that is even more subtle than I thought after experimentation with our packages in Gentoo. If you add "/..." to the end of a repository name, things work as expected, e.g.
Doing this makes "go get" not complain about non-buildable sources at the top level. So is this just a documentation issue? I didn't see anything about it in "go help" anywhere. |
The I don't think it's just a documentation issue. I think there's a subtle difference in how |
They should both fail. |
CL https://golang.org/cl/12177 mentions this issue. |
I am running go 1.4.2 on Linux/amd64 and noticed that I get an error using go get in a situation that doesn't seem to be an error. Here are the commands to reproduce it:
In this example, the first time I run "go get -d golang.org/x/tools", I do not get the successful message. Instead, a failure error code is returned along with the message:
" golang.org/x/tools: No buildable Go source files in /home/William/go/src/golang.org/x/tools"
If "-d" is download only, is this a bug, or am I misunderstanding what "-d" means?
Thanks,
William
The text was updated successfully, but these errors were encountered: