-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: one new module error is backwards, another seemed backwards #33879
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 think I can justify cherry-picking the fix for the swapped error message into the 1.13 release, but I'm not so sure about the compatibility error. (That |
Change https://golang.org/cl/191997 mentions this issue: |
Updates #33879 Change-Id: Ifc91490b1cb791fdf5ffe69ef81c0ec0e6cbecc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/191997 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]>
@gopherbot, please backport to 1.13: we should at least fix the reversed error message. |
Backport issue(s) opened: #33885 (for 1.13). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/191972 mentions this issue: |
… error message Cherry-picked from CL 191997. Updates #33879 Fixes #33885 Change-Id: Ifc91490b1cb791fdf5ffe69ef81c0ec0e6cbecc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/191997 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]> (cherry picked from commit 8f5353f) Reviewed-on: https://go-review.googlesource.com/c/go/+/191972 TryBot-Result: Gobot Gobot <[email protected]>
Updates golang#33879 Change-Id: Ifc91490b1cb791fdf5ffe69ef81c0ec0e6cbecc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/191997 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]>
Updates golang#33879 Change-Id: Ifc91490b1cb791fdf5ffe69ef81c0ec0e6cbecc3 Reviewed-on: https://go-review.googlesource.com/c/go/+/191997 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Alexander Rakoczy <[email protected]>
I might not be the best to comment on this, but as it stands now, this error message is pretty hard to understand. It's unclear which action I should take as either a module maintainer or a module consumer what to do. In this case, I am both and still unsure what to do. In our case, we're attempting to convert modules which already have been tagged past For reference, as far as we can tell, we've added everything needed here: However, trying to get it from a brand new module (and a clean mod cache):
Maybe related: #34383 |
For my own sanity, I checked to see if this issue could be reproduced for modules which have a "correct" git history. that is: the go.mod package directive has been updated to include the vX suffix throughout this history, for tags that reference a major version. It does still trigger the bug. This repo has the correct |
hi. I have similar issue with my repository https://github.com/imissyouso/textmagic-rest-go/tree/v2.0.343
|
For this one, you might be missing the trailing
(but I still think this is a usability problem nonetheless) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
issue still in go1.13.3. go get -u -v github.com/ramya-rao-a/go-outline
.......
go get -u -v golang.org/x/lint/golint
.....
gometalinter --install work fine in win cmd . it will reproduce the above issue1 .
same time, one more issue:
work fine in win cmd .
|
@crazybber, both of those error messages are correct as far as I can tell. The |
I'm going to close this issue to reduce confusion. @thepudds, feel free to file a separate issue for the second error message. |
What version of Go are you using (
go version
)?go1.13rc1
Does this issue reproduce with the latest release?
Not with Go 1.12, but yes with Go 1.13 rc1.
Issue 1
I think this new Go 1.13 error message is incorrectly swapping the two module paths in the final two lines of the error message:
Given the v1.4.2 version of that module declares its path as
github.com/sirupsen/logrus
, I think the correct form of the error would be:Example from scratch:
Issue 2
When I first saw this next error message in the wild, at first I thought it was backwards, but later concluded it was just potentially ambiguous (I think?):
In particular, it is not immediately clear which major version
should be v0 or v1, not v3
-- the major version after the@
, or the major version in the module path on themodule
line in the go.mod. Because it leads off withmodule contains a go.mod file
immediately before talking about the problematic major version, it seems like it is suggesting the major version in the go.mod fileshould be v0 or v1
(which is not the correct resolution, and you can't even have a v0 or v1 in the module line for a go.mod unless it is a corner case like gopkg.in).In this example, there is a go.mod at v3.0.0, but that go.mod is missing the required
/v3
at the end of the module path on themodule
line. As it stands, I think the error message is trying to say it would be acceptable to have a@v0.x.x
or@v1.x.x
in thego get
for thatgo.mod
? But that was not the way it read at first read, and moreover, one could at least argue that is not the fundamental error, which is really that the major version after the@
does not agree with the (missing) major version in the module path on themodule
line (and depending on how you look at it, that thego get
is also missing the/v3
before the@
).I have seen other people read this second error message backwards as well. (Side note: I'm not sure why it emits
go: finding github.com/iiinsomnia/yiigo v3.0.0
twice).Finally, sorry -- this probably should have been two separate issues.
CC @jayconrod @bcmills
The text was updated successfully, but these errors were encountered: