-
Notifications
You must be signed in to change notification settings - Fork 111
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
enumer runtime crash due to x/tools being broken in go 1.22.0 (with workaround) #71
Comments
Enumer is currently crashing if `make go-generate` is run with Go 1.22: alvaroloes/enumer#71 Temporal helpfully found an easy fix: temporalio/sdk-go#1382 For the underlying cause: golang/go#62167 So I've mimicked that by just doing a `go get golang.org/x/tools@latest` in the tools-module. And now `make clean` -> `GOTOOLCHAIN=[go1.20.1 or go1.22.1] make go-generate` both work correctly. (you need Go 1.21 or newer to use GOTOOLCHAIN. highly recommended!) Since this only affects build-time tools and doesn't change any generated code, it seems trivially safe, but I have not checked what all has changed in golang.org/x/tools across these versions.
Awesome thanks so much 🙏 Is there a fork of this repo that is still actively developed? I made my own fork with the above changes if anybody wants to use it: https://github.com/PotatoesFall/enumer (I make no guarantees to keep this up until the end of time) |
Thanks for the fork but I think I cannot get it:
|
the x/tools package used by enumer causes it to generate the following error when it is built with go 1.22.0 on Mac OSX silicon.
As you can see these errors come from x/tools not enumer
the workaround
per temporalio/sdk-go#1382 we need to update x/tools in go mod to a later version
I edited enumer/go.mod to
The text was updated successfully, but these errors were encountered: