Skip to content

add support for Go 1.25, drop 1.24, a few related fixes and tweaks#971

Merged
mvdan merged 5 commits intoburrowers:masterfrom
mvdan:go1.25
Aug 30, 2025
Merged

add support for Go 1.25, drop 1.24, a few related fixes and tweaks#971
mvdan merged 5 commits intoburrowers:masterfrom
mvdan:go1.25

Conversation

@mvdan
Copy link
Member

@mvdan mvdan commented Aug 30, 2025

(see commit messages - please do not squash)

Fixes #968.

mvdan added 4 commits August 30, 2025 15:48
While strictly speaking it would be okay to leave Go 1.24 support
in place for the time being, we are behind on a few tasks at the moment
so it's best to keep the setup at master simpler for the next release.
Go 1.25 already came out two weeks ago, and it seems to have been
a fairly smooth release, so I don't suspect any end users will have
trouble upgrading to it.

Note that two changes were necessary for garble to work on Go 1.25.0.

First, we stop deduplicating runtimeAndLinknamed with runtimeAndDeps.
Otherwise, for GOOS=windows, internal/runtime/cgroup would be missing
as it is a //go:linkname target from runtime on all platforms,
but it is not transitively imported from runtime on GOOS=windows.

Second, the testing/synctest package is now part of std,
and it is a //go:linkname target from the testing package
but not a transitive import from it. Teach appendListedPackages that,
when loading all packages for a `go test` run, it should load
the new testing/synctest package too.

Fixes burrowers#968.
The behavior is the same, but now we track the dependency in go.mod
via `go get -tool`, which is a better approach.

While here, make a package loading error slightly clearer.
New packages in Go's "allowAsmABIPkgs" list caused failures
in gogarble.txtar's use of `garble build std`.
As spotted by scripts/check-third-party.sh, it's possible to import
the testing package without using `go test`, so our previous solution
to only load testing/synctest when running `go test` was not enough.

Add a regression test via stdimporter in gogarble.txtar.
@mvdan
Copy link
Member Author

mvdan commented Aug 30, 2025

Just one failure; I think I've fixed it now.

@mvdan mvdan requested review from luantak and pagran August 30, 2025 15:35
@mvdan mvdan merged commit 36fcc61 into burrowers:master Aug 30, 2025
4 checks passed
@mvdan mvdan deleted the go1.25 branch August 31, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Go 1.25 is not supported

2 participants