-
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
mod: wrong require when migrate from dep with source config #33343
Conversation
This PR (HEAD: 5774b90) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/187959 to see it. Tip: You can toggle comments from me using the |
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
Message from Andrew Bonventre: Patch Set 1: (6 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
This change modifies Go to generate correct go.mod file. Currently go-mod puts wrong module path in requires when Gopkg.toml contains source config. for example, there is a constraint declaration in Gopkg.toml as following: [[constraint]] name = "github.com/minio/minio-go" revision = "0415038e6086735b8c917d7fdb2ca93f07d7fb60" source = "https://github.com/liuchang0812/minio-go" go-mod puts `github.com/liuchang0812/minio-go` in requires. but, it should be `github.com/minio/minio-go` Fixes: #33406
This PR (HEAD: 96fae32) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/187959 to see it. Tip: You can toggle comments from me using the |
Message from Chang Liu: Patch Set 1: (6 comments) Thank you very much. Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
Message from Chang Liu: Patch Set 2: (1 comment) I added a test case. https://github.com/liuchang0812/supreme-octo-memory is a go-dep project whose Gopkg.toml contains a source conf. convert_test.go will verify whether go-mod-in generates go.mod as expected. Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
Message from Bryan C. Mills: Patch Set 2: (3 comments) Please also update the existing test in src/cmd/go/testdata/script/mod_init_dep.txt and ensure that it passes. Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
Message from Chang Liu: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
Message from Bryan C. Mills: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
53bd915
to
6139019
Compare
4a7ed1f
to
0f992b9
Compare
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/187959. |
This change modifies Go to generate correct go.mod file.
Currently go-mod puts wrong module path in requires when
Gopkg.toml contains source config. for example, there is
a constraint declaration in Gopkg.toml as following:
go-mod puts
github.com/liuchang0812/minio-go
in requires.but, it should be
github.com/minio/minio-go
Signed-off-by: Chang Liu [email protected]