add support for Go 1.25 and drop support for 1.24

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 #968.
This commit is contained in:
Daniel Martí
2025-08-30 14:48:20 +01:00
parent 1b9c305df2
commit aed2fd2659
12 changed files with 310 additions and 272 deletions

View File

@@ -25,7 +25,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.24.x]
go-version: [1.25.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
@@ -53,17 +53,17 @@ jobs:
# Static checks from this point forward. Only run on one Go version and on
# linux, since it's the fastest platform, and the tools behave the same.
- name: Test third-party project builds
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.24.x'
if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25.x'
run: |
go install
./scripts/check-third-party.sh
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.24.x'
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25.x'
run: ./scripts/crlf-test.sh
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.24.x'
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25.x'
run: diff <(echo -n) <(gofmt -d .)
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.24.x'
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25.x'
run: go vet ./...
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.24.x'
- if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25.x'
uses: dominikh/staticcheck-action@v1
with:
version: "2025.1"
@@ -81,6 +81,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.24.x
go-version: 1.25.x
cache: false
- run: go test -short ./...