-
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: go get golang/x/tools/...: no matching versions for query "latest" #27215
Comments
Do you have GO111MODULE set to "on" ? |
yes, it was. GO111MODULE=off works ok. Also, GOMOD was set, which I think should mean it was enabled by some mechanism or other. |
Same is happening here:
|
I had the same (or very similar) problem building a module and using |
I think the Note that in module mode, |
@ivanalejandro0 I would be surprised if an issue fixable by |
Yeah, I agree. |
I can confirm @rkuska's issue with go-critic and have it documented in this Travis build. |
I've seen this error in the wild, given some packages include That said, the official documentation seems to claim that this works. In particular, From https://tip.golang.org/cmd/go/#hdr-Module_aware_go_get
Here is that example from the doc from scratch:
Note that you can get it to work though if you first do Continuing prior example:
I'm guessing that second example works because |
Having the same problem with a package providing bindings for v8:
|
@bigblind my first guess would be you might be seeing a separate issue, and perhaps one more specific to that The original report in this issue is more related to Just to get more of the standard details about your environment, etc., and to help track what you are reporting more closely, what would you think about opening a new issue? You could include the output of EDIT: the problem reported by @bigblind was in fact a separate issue and due to the |
@bcmills any brief thoughts on whether or not this is too big for 1.12 at this point? Also, it is not clear to me if this is working as designed, vs. a bug. For example, from my comment above #27215 (comment):
Or any brief comments on the cases where this would be an issue vs. not an issue? |
This is still on my radar for 1.12, but (depending on the fix) will likely slip to 1.13. |
FYI, I am still getting this in go1.12beta1 darwin/amd64 and can only make things work if I go back to the gopath.
|
HACK: For what it's worth, the following succeeds after the first attempt to
I discovered this when struggling to get
In my case, the first line is necessary for the following to succeed:
Hope this helps anyone else. EDIT: My bad -- I didn't notice that the solution was already mentioned in this previous comment when I skimmed through this the first time. I was going to delete my comment, but decided that it might still be helpful to anyone landing here and missing the earlier comment like I did. |
This breaks the workflow of installing go from source because installing additional tools doesn't work if |
Commenting to confirm that running |
@bcmills @jayconrod Any quick thoughts on whether a fix for this might be small enough to be a 1.12 back port candidate? @mvdan asked a similar question a bit ago in #29363, which I think might be a duplicate of this one. This issue is fairly awkward given the number of readmes out there that use |
The example I had listed above in #27215 (comment) seems to be fixed in tip now that #29363 is fixed. Is anyone else still seeing an issue here if you try with tip?
|
I think this can be closed after CL 174099 and other fixes to Sorry I don't think there was anything in here that could be backported to 1.12. The changes to |
This fixes applies the workaround mentioned in the comments of golang/go#27215. This workaround will be unnecessary once go 1.13 is released.
so, how to solve this kind of problem? |
@hexiao04 This is an old closed issue. If there is a problem, please file a new issue, and reference this one if you think it's relevant. For questions, please see https://golang.org/wiki/Questions. |
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
go get golang.org/x/tools/...
What did you expect to see?
success
What did you see instead?
⎣ ⇨ go get -u -v golang.org/x/tools/...
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
go: finding golang.org/x/tools/... latest
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
go: finding golang.org/x/tools latest
Fetching https://golang.org/x?go-get=1
Parsing meta tags from https://golang.org/x?go-get=1 (status code 200)
Fetching https://golang.org?go-get=1
Parsing meta tags from https://golang.org?go-get=1 (status code 200)
go get golang.org/x/tools/...: no matching versions for query "latest"
System details
The text was updated successfully, but these errors were encountered: