Skip to content
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

Closed
hyangah opened this issue Sep 28, 2018 · 1 comment
Closed

cmd/go: confusing error message 'post-v1 module path ".../v1"' #27917

hyangah opened this issue Sep 28, 2018 · 1 comment
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Sep 28, 2018

$ export GO111MODULE=on
$ go mod tidy
go: github.com/hyangah/testmod1/[email protected]: 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 [email protected]. 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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Sep 28, 2018
@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
@bcmills
Copy link
Contributor

bcmills commented Jan 15, 2019

I'm not sure what caused this, but I'm unable to replicate it with go1.12beta2 (and there have been a lot of module-resolution fixes in the meantime).

Please do reopen (or start a new issue) if you see it again.

@bcmills bcmills closed this as completed Jan 15, 2019
@golang golang locked and limited conversation to collaborators Jan 15, 2020
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants