update to Go tip from April 28th

A couple of new packages in runtimeAndDeps,
and go list's Package.DepsErrors may now include package build errors
which we want to ignore as we would print those as duplicates.
pull/725/head
Daniel Martí 1 year ago
parent b587d8c01a
commit 7bb040e635

@ -88,7 +88,7 @@ jobs:
steps: steps:
- name: Install Go - name: Install Go
env: env:
GO_COMMIT: 231f290e51e130a1699d5c29d28133d68f43d2e9 # 2023-04-08 GO_COMMIT: 0fd6ae548f550bdbee4a434285ff052fb9dc7417 # 2023-04-28
run: | run: |
cd $HOME cd $HOME
mkdir $HOME/gotip mkdir $HOME/gotip

@ -1,6 +1,6 @@
// Code generated by scripts/gen-go-std-tables.sh; DO NOT EDIT. // Code generated by scripts/gen-go-std-tables.sh; DO NOT EDIT.
// Generated from Go version devel go1.21-ffb07d0c66 Sat Feb 25 00:15:17 2023 +0000. // Generated from Go version devel go1.21-0fd6ae548f Fri Apr 28 20:33:34 2023 +0000.
package main package main
@ -11,6 +11,7 @@ var runtimeAndDeps = map[string]bool{
"internal/cpu": true, "internal/cpu": true,
"internal/bytealg": true, "internal/bytealg": true,
"internal/coverage/rtcov": true, "internal/coverage/rtcov": true,
"internal/godebugs": true,
"internal/goexperiment": true, "internal/goexperiment": true,
"internal/goos": true, "internal/goos": true,
"runtime/internal/atomic": true, "runtime/internal/atomic": true,
@ -30,6 +31,7 @@ var runtimeLinknamed = []string{
"internal/poll", "internal/poll",
"internal/reflectlite", "internal/reflectlite",
"internal/syscall/unix", "internal/syscall/unix",
"maps",
"math/rand", "math/rand",
"net", "net",
"os", "os",

@ -290,9 +290,17 @@ func appendListedPackages(packages []string, mainBuild bool) error {
} }
} }
if len(pkg.DepsErrors) > 0 { if len(pkg.DepsErrors) > 0 {
// DepsErrors appears to not include the "# pkgpath" line. for i, derr := range pkg.DepsErrors {
pkgErrors = append(pkgErrors, "# "+pkg.ImportPath) // When an error in DepsErrors starts with a "# pkg/path" line,
for _, derr := range pkg.DepsErrors { // it's an error that we're already printing via that package's Error field.
// Otherwise, the error is that we couldn't find that package at all,
// so we do need to print it here as that package won't be listed.
if i == 0 {
if strings.HasPrefix(derr.Err, "# ") {
break
}
pkgErrors = append(pkgErrors, "# "+pkg.ImportPath)
}
// Error messages sometimes include a trailing newline. // Error messages sometimes include a trailing newline.
pkgErrors = append(pkgErrors, strings.TrimSpace(derr.Err)) pkgErrors = append(pkgErrors, strings.TrimSpace(derr.Err))
} }

Loading…
Cancel
Save