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:
- name: Install Go
env:
GO_COMMIT: 231f290e51e130a1699d5c29d28133d68f43d2e9 # 2023-04-08
GO_COMMIT: 0fd6ae548f550bdbee4a434285ff052fb9dc7417 # 2023-04-28
run: |
cd $HOME
mkdir $HOME/gotip

@ -1,6 +1,6 @@
// 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
@ -11,6 +11,7 @@ var runtimeAndDeps = map[string]bool{
"internal/cpu": true,
"internal/bytealg": true,
"internal/coverage/rtcov": true,
"internal/godebugs": true,
"internal/goexperiment": true,
"internal/goos": true,
"runtime/internal/atomic": true,
@ -30,6 +31,7 @@ var runtimeLinknamed = []string{
"internal/poll",
"internal/reflectlite",
"internal/syscall/unix",
"maps",
"math/rand",
"net",
"os",

@ -290,9 +290,17 @@ func appendListedPackages(packages []string, mainBuild bool) error {
}
}
if len(pkg.DepsErrors) > 0 {
// DepsErrors appears to not include the "# pkgpath" line.
pkgErrors = append(pkgErrors, "# "+pkg.ImportPath)
for _, derr := range pkg.DepsErrors {
for i, derr := range pkg.DepsErrors {
// When an error in DepsErrors starts with a "# pkg/path" line,
// 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.
pkgErrors = append(pkgErrors, strings.TrimSpace(derr.Err))
}

Loading…
Cancel
Save