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
Labels
modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

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).

@bcmills bcmills added help wanted modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed help wanted labels May 27, 2021
@bcmills bcmills added this to the Backlog milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

1 participant