You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modulegithub.com/alvaroloes/enumergo1.17// bumped to later versionrequire (
github.com/pascaldekloe/namev0.0.0-20180628100202-0fd16699aae1golang.org/x/toolsv0.17.0//was v0.0.0-20190525145741-7be61e1b0e51
)
requiregolang.org/x/modv0.14.0// indirect
The text was updated successfully, but these errors were encountered:
jth-0
changed the title
x/tools broken in go 1.22.0 (with workaround)
enumer runtime crash due to x/tools being broken in go 1.22.0 (with workaround)
Mar 4, 2024
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.
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: