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 when outside a module from "working directory is not part of a module" [1.16 backport] #44746

Closed
gopherbot opened this issue Mar 2, 2021 · 3 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

gopherbot commented Mar 2, 2021

@jayconrod requested issue #44745 (fixed in b87e9b9 and b62da08 for Go 1.17) to be considered for backport to the next 1.16 minor release.

@gopherbot Please backport to Go 1.16. This message was triggered by #41330, and it's unexpected by most. Improving the error message carries little risk.

@gopherbot
Copy link
Author

Change https://golang.org/cl/298929 mentions this issue: [release-branch.go1.16] cmd/go: clarify errors for commands run outside a module

@dmitshur
Copy link
Contributor

dmitshur commented Mar 5, 2021

Approving per discussion in a release meeting. Only Go 1.16 needs this backport.

@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Mar 5, 2021
@toothrot toothrot modified the milestones: Go1.16.1, Go1.16.2 Mar 10, 2021
@gopherbot
Copy link
Author

Closed by merging 5993fbb to release-branch.go1.16.

gopherbot pushed a commit that referenced this issue Mar 10, 2021
…de a module

The new error message tells the user what was wrong (no go.mod found)
and directs them to 'go help modules', which links to tutorials.

Includes test fix from CL 298794
Fixes #44746

Change-Id: I98f31fec4a8757eb1792b45491519da4c552cb0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/298650
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
(cherry picked from commit b87e9b9)
Reviewed-on: https://go-review.googlesource.com/c/go/+/298929
@golang golang locked and limited conversation to collaborators Mar 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants