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: "conflicts with" message is too vague when one path is a package and the other is a module #46426

Open
bcmills opened this issue May 27, 2021 · 0 comments

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented May 27, 2021

From a Slack conversation with @myitcv and @jayconrod:

$ go get -d gopher.live/ub8a7a486d202/mod/v2@latest gopher.live/ub8a7a486d202/mod@none
go get: gopher.live/ub8a7a486d202/mod@none conflicts with gopher.live/ub8a7a486d202/mod/v2@latest (v1.0.0)

-- go.mod --
module example.com/m
go 1.17
replace (
        gopher.live/ub8a7a486d202/mod v1.0.0 => ./mod
        gopher.live/ub8a7a486d202/mod/v2 v2.0.0 => ./modv2
)
-- mod/go.mod --
module gopher.live/ub8a7a486d202/mod
go 1.17
-- mod/v2/v2.go --
package v2
-- modv2/go.mod --
module gopher.live/ub8a7a486d202/mod/v2
go 1.17

That error message is decidedly suboptimal: it's saying that the constraint gopher.live/ub8a7a486d202/mod@none (which is interpreted as a module path) conflicts with gopher.live/ub8a7a486d202/mod/v2@latest (which is a package query resolving to the same module at v1.0.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant