-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: error loading subpackage with pathMajor suffix #31605
Comments
I believe in general that is usually not a major issue in practice. I believe the way it is supposed to work in terms of restrictions around packages named That said, this is a complex example, so maybe what you are seeing is a bug, or maybe it is a correct but non-obvious result (including because the repo itself has a fairly complex setup with a complex history). There is a Alternatively, perhaps the presence of On the other hand, this seems to work:
|
/cc @bcmills @jayconrod |
This looks like an easy fix, and is closely related to the |
I take that back. It's not an easy fix because there actually is a We're not going to go out of our way to make |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Tried to fetch a poorly named subpackage at
v1.2.0
:What did you expect to see?
Successfully fetch the v1.2.0 module:
What did you see instead?
While I concede that this repo is built to test edge cases and collisions in module resolution, there is only one correct resolution for
sub/v4 => github.com/arnottcr/ec624df40c51964d7facff2c86bc6cd4@v1.2.0/sub/v4
. Is this expected, since I know many google APIs usevN
packages to track the API version, not the library version.Also, this resolution scheme pulls in a number of versions that I would not expect (
v2/sub/v3.0.0
, etc.). Should it not check two, then stop:github.com/arnottcr/ec624df40c51964d7facff2c86bc6cd4/sub/v4 v4.x.x
github.com/arnottcr/ec624df40c51964d7facff2c86bc6cd4 v1.x.x
The text was updated successfully, but these errors were encountered: