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: improve error message from empty "mod tidy" #51551

Open
leitzler opened this issue Mar 8, 2022 · 1 comment · May be fixed by #59027
Open

cmd/go: improve error message from empty "mod tidy" #51551

leitzler opened this issue Mar 8, 2022 · 1 comment · May be fixed by #59027
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

@leitzler
Copy link
Contributor

leitzler commented Mar 8, 2022

What version of Go are you using (go version)?

$ go version
go version devel go1.19-dbbe4cca5d Tue Mar 8 21:35:38 2022 +0000 darwin/amd64

Does this issue reproduce with the latest release?

At least on tip.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
N/A

What did you do?

$ go mod init foo
go: creating new go.mod: module foo
$ go mod tidy
go: warning: "all" matched no packages

What did you expect to see?

An error message that doesn't mention all, since I didn't specify all anywhere. I understand why I do get this error message but it might be confusing in other cases.

I stumbled upon this when I accidentally ran go mod init twice where the second run explicitly asks me to:

go: to add module requirements and sums:
        go mod tidy

What did you see instead?

go: warning: "all" matched no packages
@oiooj oiooj added the modules label Mar 9, 2022
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 9, 2022
@seankhliao seankhliao added the GoCommand cmd/go label Aug 20, 2022
@seankhliao seankhliao added this to the Unplanned milestone Aug 20, 2022
@gopherbot
Copy link

Change https://go.dev/cl/476175 mentions this issue: cmd/go/tidy: fix incorrect message on no modules

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

Successfully merging a pull request may close this issue.

5 participants