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: misleading "malformed module path" error with -m flag for wildcard patterns with versions #42714

Open
bcmills opened this issue Nov 19, 2020 · 0 comments
Labels
GoCommand cmd/go 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 Nov 19, 2020

go list -m supports module wildcards, and supports version queries. However, if you try to combine a wildcard with a version query, you currently get a misleading malformed module path error rather than the result of applying the query to each module in the build list that matches the wildcard.

example.com$ go version
go version devel +a14e7bf6d Wed Nov 18 06:29:09 2020 +0000 linux/amd64

example.com$ go mod init example.com
go: creating new go.mod: module example.com

example.com$ go get -d golang.org/x/text
go: downloading golang.org/x/text v0.3.4

example.com$ go list -m golang.org/x/...
golang.org/x/text v0.3.4
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e

example.com$ go list -m golang.org/x/text@latest
golang.org/x/text v0.3.4

example.com$ go list -m golang.org/x/...@latest
go list -m: golang.org/x/...@latest: malformed module path "golang.org/x/...": invalid path element "..."

CC @matloob @jayconrod

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go modules labels Nov 19, 2020
@bcmills bcmills added this to the Backlog milestone Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go 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