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: go work use panics when given a file [1.18 backport] #51764

Closed
gopherbot opened this issue Mar 17, 2022 · 4 comments
Closed

cmd/go: go work use panics when given a file [1.18 backport] #51764

gopherbot opened this issue Mar 17, 2022 · 4 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge GoCommand cmd/go
Milestone

Comments

@gopherbot
Copy link

@bcmills requested issue #51749 to be considered for backport to the next 1.18 minor release.

@gopherbot, please backport to Go 1.18. (This is a user-facing panic in go work use.)

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Mar 17, 2022
@gopherbot gopherbot added this to the Go1.18.1 milestone Mar 17, 2022
@bcmills bcmills added the CherryPickApproved Used during the release process for point releases label Mar 17, 2022
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Mar 17, 2022
@cherrymui
Copy link
Member

This is approved and targeting Go 1.18.1, but doesn't have a CL. @bcmills would you like to make a CL for this? Thanks.

@bcmills
Copy link
Contributor

bcmills commented Apr 1, 2022

The backport for this can probably wait for CL 394154, which will hopefully be a more holistic fix. (This doesn't need to block the minor release if the rest of the release is ready.)

@gopherbot
Copy link
Author

Change https://go.dev/cl/397994 mentions this issue: [release-branch.go1.18] cmd/go: prevent go work use panic when given a file

@gopherbot
Copy link
Author

Closed by merging c6ba470 to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue Apr 5, 2022
…a file

The current implementation fails to identify that an argument to go work
use is a file when expecting a directory, and panics when attempting to
access it as a directory. This change checks arguments are directories
and generates an error otherwise.

Fixes #51764
Updates #51749

Change-Id: If8f69d233409e93fcf391a8774bace74c031c986
Reviewed-on: https://go-review.googlesource.com/c/go/+/393615
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit a84ef50)
Reviewed-on: https://go-review.googlesource.com/c/go/+/397994
Reviewed-by: Cherry Mui <cherryyz@google.com>
@cherrymui cherrymui added the GoCommand cmd/go label Apr 6, 2022
@golang golang locked and limited conversation to collaborators Apr 6, 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

3 participants