-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go generate fails silently when run on a package in a nested workspace module #56098
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
Comments
Duplicate of #29751 |
Hmm, not quite a duplicate (because of workspace mode). But #29751 is definitely closely related. |
Change https://go.dev/cl/559195 mentions this issue: |
@gopherbot please backport to 1.21 and 1.22. go generate doesn't work in workspace mode and it's a one-line fix |
Backport issue(s) opened: #65351 (for 1.21), #65352 (for 1.22). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/559235 mentions this issue: |
Change https://go.dev/cl/559236 mentions this issue: |
…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
…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 <[email protected]> Reviewed-by: Bryan Mills <[email protected]> (cherry picked from commit b91bad7) Reviewed-on: https://go-review.googlesource.com/c/go/+/559236
This is necessary for go generate to enter workspace mode for recognizing package paths in the workspace. Fixes golang#56098 Change-Id: I25f68de24f4189259353f63194823516e9d3d505 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/559195 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
I noticed the following while working on https://go.dev/cl/440181. I have a
go.work
file using both x/tools and x/tools/gopls. When runninggo generate
on a package in x/tools/gopls, the command exits with status 0 without doing anything.When run from the gopls module, the go generate command works as expected. This can be seen from the following shell history, where I start from a clean workspace (at patchset 2 of the above CL), make an arbitrary edit in one of the generated files, and run go generate expecting it to revert the diff.
The text was updated successfully, but these errors were encountered: