Skip to content

fix: bump golang.org/x/tools to v0.47.0 for Go 1.27 compatibility - #124

Open
yammesicka wants to merge 1 commit into
dmarkham:masterfrom
yammesicka:fix/x-tools-go1.27
Open

fix: bump golang.org/x/tools to v0.47.0 for Go 1.27 compatibility#124
yammesicka wants to merge 1 commit into
dmarkham:masterfrom
yammesicka:fix/x-tools-go1.27

Conversation

@yammesicka

@yammesicka yammesicka commented Sep 1, 2026

Copy link
Copy Markdown

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.

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.

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.
@cupen

cupen commented Sep 4, 2026

Copy link
Copy Markdown

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants