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: unhelpful error message when running "go install" on a replaced-but-not-required package [1.16 backport] #46551

Closed
gopherbot opened this issue Jun 3, 2021 · 4 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge GoCommand cmd/go
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #46528 to be considered for backport to the next 1.16 minor release.

@gopherbot, please backport to Go 1.16.

This condition is fairly rare, but an unhelpful error message can be very confusing and frustrating when it happens, and the fix will hopefully be small and non-invasive.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Jun 3, 2021
@gopherbot gopherbot added this to the Go1.16.6 milestone Jun 3, 2021
@dmitshur dmitshur added the GoCommand cmd/go label Jun 10, 2021
@dmitshur dmitshur modified the milestones: Go1.16.6, Go1.16.7 Jul 12, 2021
@jayconrod jayconrod added the CherryPickApproved Used during the release process for point releases label Jul 13, 2021
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Jul 13, 2021
@jayconrod
Copy link
Contributor

Approving. This was a low-risk fix to a diagnostic message that was introduced in 1.16.

@bcmills bcmills self-assigned this Jul 13, 2021
@gopherbot
Copy link
Author

Change https://golang.org/cl/334371 mentions this issue: [release-branch.go1.16] cmd/go: remove hint when no module is suggested

@bcmills
Copy link
Contributor

bcmills commented Jul 13, 2021

No backport to 1.15 is needed because the unhelpful error message was not present in Go 1.15. (We produced a different error message in Go 1.15, which was not particularly more helpful but also not actively wrong in this case — but this issue didn't crop up much in Go 1.15 because we didn't yet default to -mod=readonly.)

gopherbot pushed a commit that referenced this issue Aug 2, 2021
Updates #46528
Fixes #46551

Change-Id: I2453d321ece878ea7823865758aa4a16b3ed7fe8
Reviewed-on: https://go-review.googlesource.com/c/go/+/325430
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Trust: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
(cherry picked from commit e552a6d)
Reviewed-on: https://go-review.googlesource.com/c/go/+/334371
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
@gopherbot
Copy link
Author

Closed by merging 4c62fd3 to release-branch.go1.16.

@rsc rsc unassigned bcmills Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
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 GoCommand cmd/go
Projects
None yet
Development

No branches or pull requests

4 participants