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: running go generate with go tool with different GOROOT fails
#32724
Comments
go generate within cmd/compile/internal/gc doesn't work generate the right codego generate with go tool with different GOROOT fails
|
The key point here is that the |
|
I note in your That implies that you are working in a Go 1.13 GOROOT, but the What happens if you run |
|
[I'm reproducing this on a different machine now, the original problem is still reproducible] So I'm in I built a new Go toolchain in a different directory, fresh from a clone taken a few minutes ago.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bcmills I would expect that it's exactly the same problem: confusion between the current GOROOT and the toolchain's GOROOT. But we can open a separate issue for it if you prefer. |
|
It may well have the same root cause, but I prefer to have an issue for each symptom — that way I won't add a test for one symptom and forget to verify that it fixes the others. |
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
$ cd src/cmd/compile/internal/gcsyntax.goto add a new AST node typeOFOOBARgo generateExpected
op_string.goto be updated with the new node type.Also ran:
No errors, but the generated
op_string.godoes not have the new node type.What did you expect to see?
Expected the new node type to appear in
op_string.goafter runninggo generateThe text was updated successfully, but these errors were encountered: