-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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: require and replace doesn't seem to like uppercase #31437
Comments
This message is saying "build : cannot load : reason". It sounds like (1) your go.mod in github.com/org/repo says 'module github.com/org/repo' with lowercase org, and (2) github.com/org/repo/proj contains a Go import of "github.com/org/repo/proj/submod", again with lowercase org. What matters is what's in the go.mod file and what is in the import statements. It sounds like they are both lowercase. Without details it's hard to say more. |
If the case in the (This situation should already be improved at head by @jayconrod's diagnostic changes for #28489.) |
Sorry you are right. It does work for me now - I must have had some mismatch. Thanks for your help. |
I was trying to use a submodule under a relative path and set up the go.mod to do a replace like in https://stackoverflow.com/questions/52079662/go-get-cannot-find-local-packages-when-using-modules
In my case the github organisation name has an uppercase in it. So think
github.com/Org/repo/proj/submod
But the error when I did ago build
from the top-level came out with:build github.com/org/repo/proj: cannot load github.com/org/repo/proj/submod: cannot find module providing package github.com/org/repo/proj/submod
I then changed the require and replace statements in the top-level go.mod to refer to the submodule with the all-lowercase and then it worked.
go version go1.12.1 linux/amd64
Issue similar to #26208 and #27157
The text was updated successfully, but these errors were encountered: