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: confusing error message 'post-v1 module path ".../v1"' #27917

Open
hyangah opened this Issue Sep 28, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@hyangah
Contributor

hyangah commented Sep 28, 2018

$ export GO111MODULE=on
$ go mod tidy
go: github.com/hyangah/testmod1/red@v1.0.0: red/go.mod has post-v1 module path "github.com/hyangah/testmod1/red/v1" at revision red/v1.0.0
go: error loading module requirements

I don't know how to interpret and act on the error message.
I didn't use the mentioned module path (ending with 'v1') anywhere in my go.mod files.

$ tree
.
├── blue
│   └── blue.go
├── go.mod
├── palette
│   └── main.go
├── purple
│   └── purple.go
└── red
    ├── go.mod
    └── red.go

$ cat go.mod
module github.com/hyangah/testmod1

require github.com/hyangah/testmod1/red v1.0.0

$ cat red/go.mod
module github.com/hyangah/testmod1/red

require github.com/hyangah/testmod1 v0.0.2

I was trying to move a package to a separate submodule in the same repo
following the package migration instruction found in #27858 (comment).

Started with the clone of upstream v0.0.1 that contains red and palette
packages in one single module, I created a single commit that moves the red
package to a separate module by creating a new red/go.mod file, and
updates the go.mod to require red@v1.0.0. Then, tagged the commit with
red/v1.0.0 and also with v0.0.2.

The above error is what I got when I ran go tidy or go build before pushing
the commit and tags to origin.

I don't expect go tidy or go build to work anyway
because the tags are not yet pushed to upstream (that's another issue).
But the error message is not the kind of what I expected.

$ go version
go version devel +75f4aa86ba Thu Sep 27 22:02:08 2018 +0000 darwin/amd64
$ go env GOMOD
/Users/hakim/go/src/github.com/hyangah/testmod1/go.mod

@bcmills bcmills added this to the Go1.12 milestone Sep 28, 2018

@bcmills bcmills self-assigned this Sep 28, 2018

@bcmills bcmills modified the milestones: Go1.12, Go1.13 Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment