re-generate go_std_tables.go with Go master

Two new packages linknamed with the runtime package,
one new intrinsic function, and one that is being removed in Go 1.22
but we want to keep around as long as we support Go 1.21.

Also note that, since math/rand/v2 simply does not exist until Go 1.22,
we need to adjust appendListedPackages to not fail on older versions.
pull/804/head
Daniel Martí 6 months ago committed by Paul Scheduikat
parent e712e720ce
commit abcdc1fcbf

@ -1,6 +1,6 @@
// Code generated by scripts/gen-go-std-tables.sh; DO NOT EDIT.
// Generated from Go version devel go1.21-3637132233 Sat Jun 3 01:13:08 2023 +0000.
// Generated from Go version devel go1.22-8da6405e0d Sat Nov 11 02:02:35 2023 +0000.
package main
@ -31,8 +31,10 @@ var runtimeLinknamed = []string{
"internal/poll",
"internal/reflectlite",
"internal/syscall/unix",
"internal/syscall/windows",
"maps",
"math/rand",
"math/rand/v2",
"net",
"os",
"os/signal",
@ -63,6 +65,7 @@ var compilerIntrinsicsPkgs = map[string]bool{
}
var compilerIntrinsicsFuncs = map[string]bool{
"runtime.mulUintptr": true, // Existed in Go 1.21; removed in Go 1.22.
"math.Abs": true,
"math/big.mulWW": true,
"math/bits.Add": true,
@ -150,6 +153,7 @@ var compilerIntrinsicsFuncs = map[string]bool{
"runtime/internal/atomic.Xchgint32": true,
"runtime/internal/atomic.Xchgint64": true,
"runtime/internal/atomic.Xchguintptr": true,
"runtime/internal/math.Add64": true,
"runtime/internal/math.Mul64": true,
"runtime/internal/math.MulUintptr": true,
"runtime/internal/sys.Bswap32": true,
@ -162,7 +166,6 @@ var compilerIntrinsicsFuncs = map[string]bool{
"runtime/internal/sys.TrailingZeros32": true,
"runtime/internal/sys.TrailingZeros64": true,
"runtime/internal/sys.TrailingZeros8": true,
"runtime.mulUintptr": true,
"runtime.publicationBarrier": true,
"sync/atomic.AddInt32": true,
"sync/atomic.AddInt64": true,

@ -49,6 +49,7 @@ done)
}
var compilerIntrinsicsFuncs = map[string]bool{
"runtime.mulUintptr": true, // Existed in Go 1.21; removed in Go 1.22.
$(while read path name; do
echo "\"${path}.${name}\": true,"
done <<<"${compiler_intrinsics_table}")

@ -267,7 +267,9 @@ func appendListedPackages(packages []string, mainBuild bool) error {
// like crypto/internal/boring/fipstls with boringcrypto,
// so any pkg.Error should be ignored when the build tag isn't set.
} else if pkg.ImportPath == "maps" && semver.Compare(sharedCache.GoVersionSemver, "v1.21") < 0 {
// "maps" was added in Go 1.21, so Go 1.20 runs into a "not found" error.
// added in Go 1.21, so Go 1.20 runs into a "not found" error.
} else if pkg.ImportPath == "math/rand/v2" && semver.Compare(sharedCache.GoVersionSemver, "v1.22") < 0 {
// added in Go 1.22, so Go 1.21 runs into a "not found" error.
} else {
if pkgErrors.Len() > 0 {
pkgErrors.WriteString("\n")

Loading…
Cancel
Save