-
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 mod vendor' removes requirement on replaced module #30857
Comments
go mod vendor
@bcmills so , it's Go1.2 modules bug? |
I test Go from v1.11.2 to v1.12.1. I find all of them will remove requirements from I don't display import |
run without |
In general the interaction between As for the build succeeding with Go 1.12 only, that's probably due to the fix for #27859 or #26241. |
@songjiayang, ideally it would be helpful to see the source code for the module that reproduces this error. In particular:
The output of CC @jayconrod |
@bcmills @jayconrod There is a example about the details, you can check it with link https://github.com/songjiayang/go-module-bug-example please. |
Thanks for the concrete example. As far as I can tell, the underlying bug was completely fixed in Go 1.12: the I suspect that the failure you were seeing with Go 1.11 was due to #27859. |
So, Go 1.11 no need fixed it? |
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?
I run
go mod vendor
to package all my code dependence, thego.mod
had been changed.Before change:
After change:
It auto delete
my.module.com/config
at require field, then i build with-mod=vendor
, Go 1.12 is ok , but Go 1.11.2 with errorcannot find module for path my.module.com/common/config exit 1
In this case, my
appconfig
module had requiredconfig
yet, So I want to known this's a bug for Go 1.12 or a new feature.The text was updated successfully, but these errors were encountered: