Commit Graph

13 Commits (36fcc61c4e5d0c1b5f0bd0c0240cf07954a8dc1a)

Author SHA1 Message Date
Daniel Martí 36fcc61c4e support testing/synctest when a non-test package imports "testing" too
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.
1 month ago
Daniel Martí aed2fd2659 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.
1 month ago
Daniel Martí ffed9e5438 drop support for Go 1.23
A pretty small patch, given that 1.23 and 1.24 are quite similar
in terms of what garble does.
6 months ago
Daniel Martí ad47efbe72 actually collect intrinsics from Go 1.24
The diffstat for go_std_tables.go shows that we were missing
more than two dozen new intrinsic functions from Go 1.24,
which could lead to the intrinsification done by the toolchain
to no longer work and leave programs with slower generic functions.
7 months ago
Daniel Martí ff989a15b8 regenerate tables with the latest Go versions
These will typically not cause changes, but just in case.
7 months ago
Daniel Martí 3936ebfe5d update to Go 1.24.0 and test with it on CI as well 8 months ago
Daniel Martí e8392a640a update go_std_tables.go with go1.24rc3 8 months ago
Daniel Martí 4e71f1aee3 update go_std_tables.go with go1.23.3
No changes to the values. However, to avoid noise with every bugfix
release changing all the lines, only use go1.X rather than go1.X.Y
to annotate each of the entries in maps and lists.
10 months ago
Daniel Martí 30357af923
drop Go 1.22 and require Go 1.23.0 or later (#876)
This lets us start taking advantage of featurs from Go 1.23,
particularly tracking aliases in go/types and iterators.

Note that we need to add code to properly handle or skip over the new
*types.Alias type which go/types produces for Go type aliases.
Also note that we actually turn this mode off entirely for now,
due to the bug reported at https://go.dev/issue/70394.

We don't yet remove our own alias tracking code yet due to the above.
We hope to be able to remove it very soon.
11 months ago
Daniel Martí 6e35ed3db3 generate Go tables for Go 1.23 as well
Updates #859.
1 year ago
Daniel Martí c1439947f9 generate Go tables with a list of GOTOOLCHAIN versions
This teaches the program how to collect information from multiple
Go versions and join it together. For this to work, it needs to
select the Go versions itself, which is now possible via GOTOOLCHAIN.

The merging of data is fairly simple; we join the results from all
versions, and we remove duplicates from older Go versions.

Start producing output with the Go version noted on every data point,
so that we can easily scan what each Go version is contributing.
1 year ago
Daniel Martí b49a13c556 code generate a single compiler intrinsics table
This simplifies the code generator and global variables a bit.
1 year ago
Daniel Martí 2259abb89f rewrite generation of go_std_tables.go from Bash to Go
This makes it portable and easier to maintain for any Go developers.
I also want to improve its logic, which would have been harder in shell.
1 year ago