-
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: can use invalid sub-dependency version #69437
Comments
this is working as intended, each unique import path can only exist at a single version, we're not going to allow the confusion of having the same name mean different things |
ok, sounds reasonable. |
@seankhliao I just tought about this issue a little bit more and now it doesn't seem so clear to me. Lets take a look at the following example:
I think that everyone should agree that this setup should work, because why it shouldn't?
My answer is, that import paths are determined in module's |
Go version
go version go1.23.1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I've created the following project
Steps to reproduce
I'm a bit lazy so I'll not create a gh repo with the demo but I'll provide steps to reproduce my situation
then, put this code in
main.go
and run
go build .
if you do
go get -u github.com/AllenDang/cimgui-go@9ebf619d1d03
it will build correctlyWhat did you see happen?
It seems that go decided to force Module X use Module Y at version B what resultet in build failure.
What did you expect to see?
if version is v0.* go should handle each commit as another version and respect go.mod
require
directive correctly.The text was updated successfully, but these errors were encountered: