Skip to content

cmd/go: go generate fails silently when run on a package in a nested workspace module [1.21 backport] #65351

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

Closed
gopherbot opened this issue Jan 29, 2024 · 2 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge GoCommand cmd/go
Milestone

Comments

@gopherbot
Copy link
Contributor

@matloob requested issue #56098 to be considered for backport to the next 1.21 minor release.

@gopherbot please backport to 1.21 and 1.22. go generate doesn't work in workspace mode and it's a one-line fix

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/559235 mentions this issue: [release-branch.go1.21] cmd/go/internal/generate: call modload.InitWorkFile

gopherbot pushed a commit that referenced this issue Feb 1, 2024
…rkFile

This is necessary for go generate to enter workspace mode for
recognizing package paths in the workspace.

For #56098
Fixes #65351

Change-Id: I25f68de24f4189259353f63194823516e9d3d505
Reviewed-on: https://go-review.googlesource.com/c/go/+/559195
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
(cherry picked from commit b91bad7)
Reviewed-on: https://go-review.googlesource.com/c/go/+/559235
@gopherbot
Copy link
Contributor Author

Closed by merging 01c93ad to release-branch.go1.21.

@mknyszek mknyszek added the CherryPickApproved Used during the release process for point releases label Feb 6, 2024
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Feb 6, 2024
@golang golang locked and limited conversation to collaborators Feb 5, 2025
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

2 participants