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 generate fails silently when run on a package in a nested workspace module [1.22 backport] #65352

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

Comments

@gopherbot
Copy link
Contributor

@matloob requested issue #56098 to be considered for backport to the next 1.22 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/559236 mentions this issue: [release-branch.go1.22] cmd/go/internal/generate: call modload.InitWorkFile

@matloob matloob added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Feb 1, 2024
gopherbot pushed a commit that referenced this issue Feb 2, 2024
…rkFile

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

For #56098
Fixes #65352

Change-Id: I25f68de24f4189259353f63194823516e9d3d505
Reviewed-on: https://go-review.googlesource.com/c/go/+/559195
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit b91bad7)
Reviewed-on: https://go-review.googlesource.com/c/go/+/559236
@gopherbot gopherbot added this to the Go1.22.1 milestone Feb 2, 2024
@gopherbot
Copy link
Contributor Author

Closed by merging b0957cf to release-branch.go1.22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPickApproved Used during the release process for point releases GoCommand cmd/go
Projects
None yet
Development

No branches or pull requests

2 participants