Skip to content

build: update golang.org/x/tools to v0.42.0 for Go 1.25+ compatibility#703

Open
vdemeester wants to merge 1 commit intosmartystreets:masterfrom
vdemeester:update-x-tools-for-go-1.25
Open

build: update golang.org/x/tools to v0.42.0 for Go 1.25+ compatibility#703
vdemeester wants to merge 1 commit intosmartystreets:masterfrom
vdemeester:update-x-tools-for-go-1.25

Conversation

@vdemeester
Copy link

The vendored golang.org/x/tools v0.18.0 uses unsafe struct punching into token.FileSet internals that breaks with Go 1.25+ due to token.FileSet layout changes.

This updates to golang.org/x/tools v0.42.0 which uses the native FileSet.AddExistingFiles method available since Go 1.25.

Fixes build errors with Go 1.25+:

vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go:78:9:
invalid array length -delta * delta (constant -256 of type int64)

Reference: https://go-review.googlesource.com/c/tools/+/672618

Testing:

  • Verified build succeeds with updated dependencies
  • All packages build successfully

This change is needed for NixOS/nixpkgs#490992

The vendored golang.org/x/tools v0.18.0 uses unsafe struct punching into
token.FileSet internals that breaks with Go 1.25+ due to token.FileSet
layout changes.

This updates to golang.org/x/tools v0.42.0 which uses the native
FileSet.AddExistingFiles method available since Go 1.25.

Fixes build errors with Go 1.25+:
  vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go:78:9:
  invalid array length -delta * delta (constant -256 of type int64)

Reference: https://go-review.googlesource.com/c/tools/+/672618
vdemeester added a commit to vdemeester/nixpkgs that referenced this pull request Feb 16, 2026
Update golang.org/x/tools dependency to v0.42.0 via upstream patch.

The vendored golang.org/x/tools v0.18.0 uses unsafe struct punching into
token.FileSet internals that breaks with Go 1.25+ due to token.FileSet
layout changes.

Upstream PR: smartystreets/goconvey#703
Fixes: NixOS#490142 (comment)
vdemeester added a commit to vdemeester/nixpkgs that referenced this pull request Feb 17, 2026
Update golang.org/x/tools dependency to v0.42.0 via upstream patch.

The vendored golang.org/x/tools v0.18.0 uses unsafe struct punching into
token.FileSet internals that breaks with Go 1.25+ due to token.FileSet
layout changes.

Upstream PR: smartystreets/goconvey#703
Fixes: NixOS#490142 (comment)
vdemeester added a commit to vdemeester/nixpkgs that referenced this pull request Feb 17, 2026
Update golang.org/x/tools dependency to v0.42.0 via upstream patch.

The vendored golang.org/x/tools v0.18.0 uses unsafe struct punching into
token.FileSet internals that breaks with Go 1.25+ due to token.FileSet
layout changes.

Upstream PR: smartystreets/goconvey#703
Fixes: NixOS#490142 (comment)
orzklv pushed a commit to xinux-org/nixpkgs that referenced this pull request Feb 17, 2026
Update golang.org/x/tools dependency to v0.42.0 via upstream patch.

The vendored golang.org/x/tools v0.18.0 uses unsafe struct punching into
token.FileSet internals that breaks with Go 1.25+ due to token.FileSet
layout changes.

Upstream PR: smartystreets/goconvey#703
Fixes: NixOS#490142 (comment)
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.

1 participant