Skip to content

drop Go 1.25, support Go 1.26#992

Open
mvdan wants to merge 8 commits intoburrowers:masterfrom
mvdan:go1.26
Open

drop Go 1.25, support Go 1.26#992
mvdan wants to merge 8 commits intoburrowers:masterfrom
mvdan:go1.26

Conversation

@mvdan
Copy link
Member

@mvdan mvdan commented Feb 12, 2026

(see commit messages - please do not squash)

@mvdan
Copy link
Member Author

mvdan commented Mar 14, 2026

I resolved two bugs relating to intrinsics, fixing one of the three test failures we had earlier. Another I understand the problem - it relates to the linker's checking of what packages are allowed to reach for specific linknames - but I need to think a bit about what the correct solution is here.

mvdan added 4 commits March 15, 2026 13:33
It can be rather slow on multi-megabyte binaries,
and its output can also be pretty massive at times.
Let the user run it separately on the files we store
to the bincmp_output directory.
This starts causing a failure on Go 1.26, which we only capture
in another test via `go test` by accident, so make sure we cover it.
Without a fix and on go1.26, I now see:

    > exec garble build -o=main$exe ./stdimporter
    [stderr]
    # test/main/stdimporter
    link: x9BrC6t: invalid reference to runtime.pprof_goroutineLeakProfileWithLabels
We still test GOARCH=arm64 as part of darwin/arm64 below.
Make runtimeAndLinknamed a set, like the other tables, for easy lookups
which will come in handy for Go 1.26 support.

Run `go list` across multiple platforms to ensure we cover all bases.
This again will help for Go 1.26 support, which introduces more
packages specific to MacOS and Windows.
@mvdan
Copy link
Member Author

mvdan commented Mar 15, 2026

@luantak all tests are passing for me now on go1.26.1, PTAL. I did multiple commits because I needed multiple tweaks and fixes which could be done before the big flip to 1.26, and that should also make the code review a bit easier.

@mvdan mvdan requested a review from luantak March 15, 2026 13:34
@mvdan mvdan marked this pull request as ready for review March 15, 2026 13:34
@mvdan mvdan changed the title WIP: drop Go 1.25, support Go 1.26 drop Go 1.25, support Go 1.26 Mar 15, 2026
Beyond the usual updating of version strings, re-running `go generate`,
and updating the patches for the linker, we needed extra changes.

First, the linker started being stricter about which packages
are allowed to linkname runtime names by import path.
Stop obfuscating import paths in runtimeAndLinknamed.

Second, the compiler's intrinsics code adds an "add" function
much like the existing "addF", so tweak the regular expression.

Third, note that there is a new runtimeAndDeps windows-only package,
which we find thanks to the recent improvement to cover many platforms.

Fourth, the code around magic numbers in the runtime has changed,
so rewrite the code which patches it via go/ast.

Fixes burrowers#990.
@mvdan
Copy link
Member Author

mvdan commented Mar 15, 2026

Hm. Windows is badly broken. This will be hard for me to debug because I don't have a Windows machine right now. Any help appreciated.

@mvdan
Copy link
Member Author

mvdan commented Mar 15, 2026

Ah, this could very well be golang/go#77975, which has extremely similar fatal error messages. The fix for that is going to be released with go1.26.2 very soon.

On the basis that I suspect the majority of our users are on Linux/Mac, and that we can't do much for now until 1.26.2 is released to further investigate Windows, I might go ahead and merge with Windows failing. I'm re-running Linux and Mac to see if they're green.

mvdan added 3 commits March 15, 2026 13:52
This was causing a number of failures on GOOS=darwin in CI.

Thanks to LOVECHEN on GitHub for suggesting this.
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.

3 participants