fix: bump golang.org/x/tools to v0.47.0 for Go 1.27 compatibility - #124
Open
yammesicka wants to merge 1 commit into
Open
fix: bump golang.org/x/tools to v0.47.0 for Go 1.27 compatibility#124yammesicka wants to merge 1 commit into
yammesicka wants to merge 1 commit into
Conversation
enumer fails under Go 1.27 with:
enumer: internal error: package "fmt" without types was imported from "<pkg>"
The pinned golang.org/x/tools v0.31.0 predates Go 1.27's export data
format. Its go/packages loader cannot decode type information for
standard library packages built by the 1.27 toolchain, so imported
packages come back without types and the generator aborts.
Bump golang.org/x/tools to v0.47.0 (and the x/mod and x/sync indirects
to matching v0.37.0 / v0.21.0). x/tools v0.47.0 declares go 1.25.0, so
the module go directive moves to 1.25.0 to match.
The CI setup-go steps now read the version via go-version-file: 'go.mod'
instead of a hardcoded go-version, so the workflows track whatever the
module declares and will not need another patch the next time the go
directive moves.
Verified with go build, go vet and the full test suite (including
TestGolden and TestEndToEnd) on Go 1.27.0; no golden files required
regeneration.
|
LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
enumer fails under Go 1.27 with:
The pinned golang.org/x/tools v0.31.0 predates Go 1.27's export data format. Its go/packages loader cannot decode type information for standard library packages built by the 1.27 toolchain, so imported packages come back without types and the generator aborts.
Bump golang.org/x/tools to v0.47.0 (and the x/mod and x/sync indirects to matching v0.37.0 / v0.21.0). x/tools v0.47.0 declares go 1.25.0, so the module go directive moves to 1.25.0 to match.
Verified with go build, go vet and the full test suite (including TestGolden and TestEndToEnd) on Go 1.27.0; no golden files required regeneration.