From ebedcc96c8a42c04287b9fa13a16fe0c2a8f270f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:52:54 +0000 Subject: [PATCH 1/2] build(deps): bump golang.org/x/net from 0.62.0 to 0.63.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.62.0 to 0.63.0. - [Commits](https://github.com/golang/net/compare/v0.62.0...v0.63.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.63.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 10 ++-- go.sum | 20 +++---- .../golang.org/x/net/http2/transport_wrap.go | 41 +++++++++++---- vendor/golang.org/x/text/language/parse.go | 4 +- .../x/tools/go/gcexportdata/gcexportdata.go | 36 ++++--------- .../x/tools/internal/gcimporter/iexport.go | 52 +++---------------- .../x/tools/internal/gcimporter/iimport.go | 50 +++++------------- .../x/tools/internal/gocommand/invoke.go | 6 ++- .../internal/gocommand/invoke_notunix.go | 34 +++++++++++- .../x/tools/internal/gocommand/invoke_unix.go | 44 +++++++++++++++- .../internal/typesinternal/assignedaddress.go | 4 +- .../x/tools/internal/typesinternal/types.go | 2 +- vendor/modules.txt | 10 ++-- 13 files changed, 168 insertions(+), 145 deletions(-) diff --git a/go.mod b/go.mod index 821084cd2d..fd5b5101a6 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( go.opentelemetry.io/otel/sdk v1.47.0 go.opentelemetry.io/otel/trace v1.47.0 go.uber.org/mock v0.6.0 - golang.org/x/net v0.62.0 + golang.org/x/net v0.63.0 golang.org/x/sync v0.25.0 golang.org/x/sys v0.50.0 google.golang.org/grpc v1.85.0 @@ -132,10 +132,10 @@ require ( go.opentelemetry.io/otel/metric v1.47.0 // indirect go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect - golang.org/x/crypto v0.58.0 // indirect - golang.org/x/mod v0.41.0 // indirect - golang.org/x/text v0.43.0 // indirect - golang.org/x/tools v0.51.0 // indirect + golang.org/x/crypto v0.59.0 // indirect + golang.org/x/mod v0.42.0 // indirect + golang.org/x/text v0.44.0 // indirect + golang.org/x/tools v0.52.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc // indirect google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.6.2 // indirect sigs.k8s.io/yaml v1.6.0 // indirect diff --git a/go.sum b/go.sum index 4d359e5ab2..9a153b33e6 100644 --- a/go.sum +++ b/go.sum @@ -1140,8 +1140,8 @@ golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5 golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= -golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= -golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= +golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c= +golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1211,8 +1211,8 @@ golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= +golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1298,8 +1298,8 @@ golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= -golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= -golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= +golang.org/x/net v0.63.0 h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0= +golang.org/x/net v0.63.0/go.mod h1:15JLg3IX1bLjHK264EZQEbIpTiR/KVLuo9CTRWd0pig= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1550,8 +1550,8 @@ golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= -golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= -golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= +golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo= +golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1635,8 +1635,8 @@ golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxb golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= -golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= -golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= +golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs= +golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/vendor/golang.org/x/net/http2/transport_wrap.go b/vendor/golang.org/x/net/http2/transport_wrap.go index eeaa95f03c..002cb50564 100644 --- a/vendor/golang.org/x/net/http2/transport_wrap.go +++ b/vendor/golang.org/x/net/http2/transport_wrap.go @@ -58,6 +58,12 @@ func (t transportConfig) Registered(t1 *http.Transport) { t.t.lazyt1 = t1 } +// GetClientConnStateFunc is called to provide us with a function +// which may be used to fetch additional state from a ClientConn. +func (t transportConfig) GetClientConnStateFunc(f func(*http.ClientConn) any) { + t.t.getCCState = f +} + func (t transportConfig) DisableCompression() bool { return t.t.DisableCompression } @@ -129,8 +135,9 @@ func (t transportConfig) DialFromContext(ctx context.Context, network, address s } type transportInternal struct { - initOnce sync.Once - lazyt1 *http.Transport + initOnce sync.Once + lazyt1 *http.Transport + getCCState func(*http.ClientConn) any dialMu sync.Mutex dials map[string]*transportDialState @@ -525,10 +532,32 @@ func (cc *ClientConn) state() ClientConnState { cc.mu.Lock() defer cc.mu.Unlock() cc.updateStateLocked() + var gotStats bool + var streamsActive int + if cc.tr.getCCState != nil { + stats, ok := cc.tr.getCCState(cc.cc).(interface { + StreamsActive() int + MaxConcurrentStreams() int + }) + if ok { + gotStats = true + streamsActive = stats.StreamsActive() + cc.maxConcurrent = stats.MaxConcurrentStreams() + } + } + if !gotStats { + streamsActive = cc.cc.InFlight() - cc.reserved + if !cc.closed { + // This is slightly racy (a request could start or finish in between + // the Available and InFlight calls), but the best we can do given that + // the net/http ClientConn API doesn't expose the conn's max concurrency. + cc.maxConcurrent = cc.cc.Available() + cc.cc.InFlight() + } + } return ClientConnState{ Closed: cc.closed, Closing: cc.closing, - StreamsActive: cc.cc.InFlight() - cc.reserved, + StreamsActive: streamsActive, StreamsReserved: cc.reserved, StreamsPending: cc.pending, MaxConcurrentStreams: uint32(min(int64(cc.maxConcurrent), math.MaxUint32)), @@ -556,12 +585,6 @@ func (cc *ClientConn) updateStateLocked() { if cc.cc.InFlight() == 0 && cc.roundTrips > 0 && cc.starting == 0 { cc.lastIdle = time.Now() } - if !cc.closed { - // This is slightly racy (a request could start or finish in between - // the Available and InFlight calls), but the best we can do given that - // the net/http ClientConn API doesn't expose the conn's max concurrency. - cc.maxConcurrent = cc.cc.Available() + cc.cc.InFlight() - } if cc.shutdownc != nil && cc.cc.InFlight()+cc.starting == 0 { close(cc.shutdownc) cc.shutdownc = nil diff --git a/vendor/golang.org/x/text/language/parse.go b/vendor/golang.org/x/text/language/parse.go index 053336e286..65b53b915b 100644 --- a/vendor/golang.org/x/text/language/parse.go +++ b/vendor/golang.org/x/text/language/parse.go @@ -166,7 +166,9 @@ func ParseAcceptLanguage(s string) (tag []Tag, q []float32, err error) { } }() - if strings.Count(s, "-") > 1000 { + // The BCP 47 scanner aliases '_' to '-' in scanner.init + // (internal/language/parse.go); the guard must count both. + if strings.Count(s, "-")+strings.Count(s, "_") > 1000 { return nil, nil, errTagListTooLarge } diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go index 5b0e3b47e3..ea918e7ec4 100644 --- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -38,8 +38,8 @@ // // The [NewImporter], [Find], and [NewReader] functions are deprecated // and should not be used in new code. -// The [WriteBundle] and [ReadBundle] functions are experimental, and -// there is an open proposal to deprecate them (https://go.dev/issue/69573). +// The [WriteBundle] and [ReadBundle] functions are obsolete experiments +// and are no longer supported (https://go.dev/issue/69573). package gcexportdata import ( @@ -175,11 +175,13 @@ func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, case 'i': // indexed, produced by cmd/compile till go1.19, - // and also by [Write]. + // and also by [Write]. Starting with go1.28, + // go list -export runs cmd/export, which emits this format. return gcimporter.IImportData(fset, imports, data[1:], path) case 'u': - // unified, produced by cmd/compile since go1.20 + // unified, produced by cmd/compile since go1.20. + // Produced by go list -export from go1.20 to go1.27. _, pkg, err := gcimporter.UImportData(fset, imports, data[1:], path) return pkg, err @@ -200,28 +202,12 @@ func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { return gcimporter.IExportData(out, fset, pkg) } -// ReadBundle reads an export bundle from in, decodes it, and returns type -// information for the packages. -// File position information is added to fset. -// -// ReadBundle may inspect and add to the imports map to ensure that references -// within the export bundle to other packages are consistent. -// -// On return, the state of the reader is undefined. -// -// Experimental: This API is experimental and may change in the future. +// Deprecated: ReadBundle is an unsupported obsolete experimental API. It returns an error. func ReadBundle(in io.Reader, fset *token.FileSet, imports map[string]*types.Package) ([]*types.Package, error) { - data, err := readAll(in) - if err != nil { - return nil, fmt.Errorf("reading export bundle: %v", err) - } - return gcimporter.IImportBundle(fset, imports, data) + return nil, fmt.Errorf("ReadBundle is an unsupported obsolete experimental API") } -// WriteBundle writes encoded type information for the specified packages to out. -// The FileSet provides file position information for named objects. -// -// Experimental: This API is experimental and may change in the future. -func WriteBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error { - return gcimporter.IExportBundle(out, fset, pkgs) +// Deprecated: WriteBundle is an unsupported obsolete experimental API. It returns an error. +func WriteBundle(io.Writer, *token.FileSet, []*types.Package) error { + return fmt.Errorf("WriteBundle is an unsupported obsolete experimental API") } diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index 6bee3c413f..c9468fc3b1 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -282,9 +282,9 @@ func IExportShallow(fset *token.FileSet, pkg *types.Package, reportf ReportFunc) // fact iexportCommon doesn't even check for I/O errors. // TODO(adonovan): handle I/O errors properly. // TODO(adonovan): use byte slices throughout, avoiding copying. - const bundle, shallow = false, true + const shallow = true var out bytes.Buffer - err := iexportCommon(&out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}, reportf) + err := iexportCommon(&out, fset, shallow, iexportVersion, []*types.Package{pkg}, reportf) return out.Bytes(), err } @@ -301,9 +301,8 @@ func IExportShallow(fset *token.FileSet, pkg *types.Package, reportf ReportFunc) // TODO(rfindley): remove reportf when we are confident enough in the new // objectpath encoding. func IImportShallow(fset *token.FileSet, getPackages GetPackagesFunc, data []byte, path string, reportf ReportFunc) (*types.Package, error) { - const bundle = false const shallow = true - pkgs, err := iimportCommon(fset, getPackages, data, bundle, path, shallow, reportf) + pkgs, err := iimportCommon(fset, getPackages, data, path, shallow, reportf) if err != nil { return nil, err } @@ -313,27 +312,17 @@ func IImportShallow(fset *token.FileSet, getPackages GetPackagesFunc, data []byt // ReportFunc is the type of a function used to report formatted bugs. type ReportFunc = func(string, ...any) -// Current bundled export format version. Increase with each format change. -// 0: initial implementation -const bundleVersion = 0 - // IExportData writes indexed export data for pkg to out. // // If no file set is provided, position info will be missing. // The package path of the top-level package will not be recorded, // so that calls to IImportData can override with a provided package path. func IExportData(out io.Writer, fset *token.FileSet, pkg *types.Package) error { - const bundle, shallow = false, false - return iexportCommon(out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}, nil) -} - -// IExportBundle writes an indexed export bundle for pkgs to out. -func IExportBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error { - const bundle, shallow = true, false - return iexportCommon(out, fset, bundle, shallow, iexportVersion, pkgs, nil) + const shallow = false + return iexportCommon(out, fset, shallow, iexportVersion, []*types.Package{pkg}, nil) } -func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, version int, pkgs []*types.Package, reportf ReportFunc) (err error) { +func iexportCommon(out io.Writer, fset *token.FileSet, shallow bool, version int, pkgs []*types.Package, reportf ReportFunc) (err error) { if !debug { defer func() { if e := recover(); e != nil { @@ -363,9 +352,7 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, ver declIndex: map[types.Object]uint64{}, tparamNames: map[types.Object]string{}, typIndex: map[types.Type]uint64{}, - } - if !bundle { - p.localpkg = pkgs[0] + localpkg: pkgs[0], } for i, pt := range predeclared() { @@ -383,14 +370,6 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, ver p.pushDecl(scope.Lookup(name)) } } - - if bundle { - // Ensure pkg and its imports are included in the index. - p.allPkgs[pkg] = true - for _, imp := range pkg.Imports() { - p.allPkgs[imp] = true - } - } } // Loop until no more work. @@ -413,25 +392,10 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, ver dataLen := uint64(p.data0.Len()) w := p.newWriter() w.writeIndex(p.declIndex) - - if bundle { - w.uint64(uint64(len(pkgs))) - for _, pkg := range pkgs { - w.pkg(pkg) - imps := pkg.Imports() - w.uint64(uint64(len(imps))) - for _, imp := range imps { - w.pkg(imp) - } - } - } w.flush() // Assemble header. var hdr intWriter - if bundle { - hdr.uint64(bundleVersion) - } hdr.uint64(uint64(p.version)) hdr.uint64(uint64(p.strings.Len())) if p.shallow { @@ -573,7 +537,7 @@ type iexporter struct { shallow bool // don't put types from other packages in the index objEncoder *objectpath.Encoder // encodes objects from other packages in shallow mode; lazily allocated - localpkg *types.Package // (nil in bundle mode) + localpkg *types.Package // allPkgs tracks all packages that have been referenced by // the export data, so we can ensure to include them in the diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index e91498828e..5999072064 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -93,18 +93,13 @@ const ( // If the export data version is not recognized or the format is otherwise // compromised, an error is returned. func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (*types.Package, error) { - pkgs, err := iimportCommon(fset, GetPackagesFromMap(imports), data, false, path, false, nil) + pkgs, err := iimportCommon(fset, GetPackagesFromMap(imports), data, path, false, nil) if err != nil { return nil, err } return pkgs[0], nil } -// IImportBundle imports a set of packages from the serialized package bundle. -func IImportBundle(fset *token.FileSet, imports map[string]*types.Package, data []byte) ([]*types.Package, error) { - return iimportCommon(fset, GetPackagesFromMap(imports), data, true, "", false, nil) -} - // A GetPackagesFunc function obtains the non-nil symbols for a set of // packages, creating and recursively importing them as needed. An // implementation should store each package symbol is in the Pkg @@ -144,15 +139,13 @@ func GetPackagesFromMap(m map[string]*types.Package) GetPackagesFunc { } } -func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte, bundle bool, path string, shallow bool, reportf ReportFunc) (pkgs []*types.Package, err error) { +func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte, path string, shallow bool, reportf ReportFunc) (pkgs []*types.Package, err error) { const currentVersion = iexportVersionCurrent version := int64(-1) if !debug { defer func() { if e := recover(); e != nil { - if bundle { - err = fmt.Errorf("%v", e) - } else if version > currentVersion { + if version > currentVersion { err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) } else { err = fmt.Errorf("internal error while importing %q (%v); please report an issue", path, e) @@ -163,12 +156,6 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte r := &intReader{bytes.NewReader(data), path} - if bundle { - if v := r.uint64(); v != bundleVersion { - errorf("unknown bundle format version %d", v) - } - } - version = int64(r.uint64()) switch version { case iexportVersionGenericMethods, iexportVersionGo1_18, iexportVersionPosCol, iexportVersionGo1_11: @@ -287,29 +274,16 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte pkgList[i] = pkg } - if bundle { - pkgs = make([]*types.Package, r.uint64()) - for i := range pkgs { - pkg := p.pkgAt(r.uint64()) - imps := make([]*types.Package, r.uint64()) - for j := range imps { - imps[j] = p.pkgAt(r.uint64()) - } - pkg.SetImports(imps) - pkgs[i] = pkg - } - } else { - if len(pkgList) == 0 { - errorf("no packages found for %s", path) - panic("unreachable") - } - pkgs = pkgList[:1] - - // record all referenced packages as imports - list := slices.Clone(pkgList[1:]) - sort.Sort(byPath(list)) - pkgs[0].SetImports(list) + if len(pkgList) == 0 { + errorf("no packages found for %s", path) + panic("unreachable") } + pkgs = pkgList[:1] + + // record all referenced packages as imports + list := slices.Clone(pkgList[1:]) + sort.Sort(byPath(list)) + pkgs[0].SetImports(list) for _, pkg := range pkgs { if pkg.Complete() { diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go index 58721202de..ec4e713cea 100644 --- a/vendor/golang.org/x/tools/internal/gocommand/invoke.go +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go @@ -232,6 +232,7 @@ func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { // mod needs the sub-verb before flags. goArgs = append(goArgs, i.Args[0]) appendModFile() + appendOverlayFlag() // all 'go mod' subcommands accept -overlay goArgs = append(goArgs, i.Args[1:]...) case "get": goArgs = append(goArgs, i.BuildFlags...) @@ -246,6 +247,7 @@ func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { goArgs = append(goArgs, i.Args...) } cmd := exec.Command("go", goArgs...) + setProcessGroup(cmd) cmd.Stdout = stdout cmd.Stderr = stderr @@ -402,7 +404,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { } // Cancelled. Interrupt and see if it ends voluntarily. - if err := cmd.Process.Signal(os.Interrupt); err == nil { + if err := interruptProcess(cmd); err == nil { // (We used to wait only 1s but this proved // fragile on loaded builder machines.) timer := time.NewTimer(5 * time.Second) @@ -415,7 +417,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { } // Didn't shut down in response to interrupt. Kill it hard. - if err := cmd.Process.Kill(); err != nil && !errors.Is(err, os.ErrProcessDone) && debug { + if err := killProcess(cmd); err != nil && !errors.Is(err, os.ErrProcessDone) && debug { log.Printf("error killing the Go command: %v", err) } diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke_notunix.go b/vendor/golang.org/x/tools/internal/gocommand/invoke_notunix.go index 469c648e4d..a156a8ffcb 100644 --- a/vendor/golang.org/x/tools/internal/gocommand/invoke_notunix.go +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke_notunix.go @@ -6,8 +6,40 @@ package gocommand -import "os" +import ( + "errors" + "os" + "os/exec" +) // sigStuckProcess is the signal to send to kill a hanging subprocess. // On Unix we send SIGQUIT, but on non-Unix we only have os.Kill. var sigStuckProcess = os.Kill + +// setProcessGroup is a no-op on non-Unix platforms. +// +// As a consequence of not using process groups (or Windows job objects), +// signals sent to cmd.Process will not propagate to descendant processes +// spawned by the Go command (such as cgo or C compilers). If the command +// is cancelled, those subprocesses may continue running in the background +// until they finish or fail due to broken pipes. +// TODO(pjw): consider adding Windows job objects. +func setProcessGroup(cmd *exec.Cmd) { +} + +// interruptProcess sends an interrupt signal to the process. On Windows, +// os.Interrupt is not supported and will return an error, causing the caller +// to fall back to killProcess immediately. +func interruptProcess(cmd *exec.Cmd) error { + return cmd.Process.Signal(os.Interrupt) +} + +// killProcess terminates the process directly. Subprocesses spawned by the +// Go command will not be killed directly. +func killProcess(cmd *exec.Cmd) error { + err := cmd.Process.Kill() + if errors.Is(err, os.ErrProcessDone) { + return nil + } + return err +} diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke_unix.go b/vendor/golang.org/x/tools/internal/gocommand/invoke_unix.go index 169d37c8e9..be60ebb09f 100644 --- a/vendor/golang.org/x/tools/internal/gocommand/invoke_unix.go +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke_unix.go @@ -6,8 +6,48 @@ package gocommand -import "syscall" +import ( + "errors" + "os/exec" + "syscall" +) -// Sigstuckprocess is the signal to send to kill a hanging subprocess. +// sigStuckProcess is the signal to send to kill a hanging subprocess. // Send SIGQUIT to get a stack trace. var sigStuckProcess = syscall.SIGQUIT + +// setProcessGroup sets Setpgid so that the child process runs as the leader of +// its own process group. Any subprocesses spawned by the Go command (such as +// cgo, compilers, or assemblers) will inherit this process group, allowing +// cancellation signals to reach all descendant processes rather than orphaning +// them (see golang/go#81408). +func setProcessGroup(cmd *exec.Cmd) { + if cmd.SysProcAttr == nil { + cmd.SysProcAttr = &syscall.SysProcAttr{} + } + cmd.SysProcAttr.Setpgid = true +} + +// interruptProcess sends SIGINT to the entire process group (-pid) so that both +// the Go command and any subprocesses (such as C compilers) get +// the interrupt signal and terminate promptly. +// +// Unlike cmd.Process.Signal, syscall.Kill(-pid, ...) does not synchronize with +// cmd.Process.Wait via os.Process's internal lock. PGID reuse is not a +// problem, as the kernel reserves the PGID as long as any member +// of the process group is alive, and runCmdContext only signals the +// process group while cmd.Wait is still blocked on the process or its open pipes. +func interruptProcess(cmd *exec.Cmd) error { + return syscall.Kill(-cmd.Process.Pid, syscall.SIGINT) +} + +// killProcess sends SIGKILL to the entire process group (-pid) to forcefully +// terminate any remaining descendant processes. It ignores ESRCH if the process +// group has already terminated. +func killProcess(cmd *exec.Cmd) error { + err := syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) + if errors.Is(err, syscall.ESRCH) { + return nil + } + return err +} diff --git a/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go b/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go index 020defc383..4b5d488a05 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/assignedaddress.go @@ -76,8 +76,8 @@ outer: // The receiver may be an embedded field, so we need // to get the inner-most type (right before the method // call in seln.Index()) - for _, idx := range seln.Index()[:len(seln.Index())-1] { - t = t.Underlying().(*types.Struct).Field(idx).Type() + for field := range ImplicitFieldSelections(seln) { + t = field.Type() } if !is[*types.Pointer](t.Underlying()) { return true // takes address of receiver diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go index b916df2250..3d9dc04d4a 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/types.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go @@ -247,7 +247,7 @@ func ObjectKind(obj types.Object) string { // ImplicitFieldSelections returns the sequence of implicit embedded fields // traversed by the given selection. It skips the final leaf field or method. // The boolean component indicates whether the traversal traversed a pointer. -func ImplicitFieldSelections(seln types.Selection) iter.Seq2[*types.Var, bool] { +func ImplicitFieldSelections(seln *types.Selection) iter.Seq2[*types.Var, bool] { return func(yield func(*types.Var, bool) bool) { var ( t = seln.Recv() diff --git a/vendor/modules.txt b/vendor/modules.txt index 8b2ad8238a..b90aea706b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -643,17 +643,17 @@ go.yaml.in/yaml/v2 # go.yaml.in/yaml/v3 v3.0.5 ## explicit; go 1.16 go.yaml.in/yaml/v3 -# golang.org/x/crypto v0.58.0 +# golang.org/x/crypto v0.59.0 ## explicit; go 1.26.0 golang.org/x/crypto/curve25519 golang.org/x/crypto/pbkdf2 -# golang.org/x/mod v0.41.0 +# golang.org/x/mod v0.42.0 ## explicit; go 1.26.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/modfile golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.62.0 +# golang.org/x/net v0.63.0 ## explicit; go 1.26.0 golang.org/x/net/bpf golang.org/x/net/http/httpguts @@ -677,7 +677,7 @@ golang.org/x/sys/windows/registry golang.org/x/sys/windows/svc golang.org/x/sys/windows/svc/debug golang.org/x/sys/windows/svc/mgr -# golang.org/x/text v0.43.0 +# golang.org/x/text v0.44.0 ## explicit; go 1.26.0 golang.org/x/text/cases golang.org/x/text/internal @@ -689,7 +689,7 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/tools v0.51.0 +# golang.org/x/tools v0.52.0 ## explicit; go 1.26.0 golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/ast/edge From 9e724fc29da0ac409e7e7a3c29c01701b4ac2dbc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Nov 2026 03:53:41 +0000 Subject: [PATCH 2/2] go mod tidy && go mod vendor Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- test/go.mod | 6 +++--- test/go.sum | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/go.mod b/test/go.mod index c5bd4ab5fa..f1eade3f11 100644 --- a/test/go.mod +++ b/test/go.mod @@ -114,9 +114,9 @@ require ( go.opentelemetry.io/otel/trace v1.47.0 // indirect go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect - golang.org/x/crypto v0.58.0 // indirect - golang.org/x/net v0.62.0 // indirect - golang.org/x/text v0.43.0 // indirect + golang.org/x/crypto v0.59.0 // indirect + golang.org/x/net v0.63.0 // indirect + golang.org/x/text v0.44.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc // indirect gotest.tools/v3 v3.5.2 // indirect sigs.k8s.io/yaml v1.6.0 // indirect diff --git a/test/go.sum b/test/go.sum index 17265ef72c..935f204cb7 100644 --- a/test/go.sum +++ b/test/go.sum @@ -277,12 +277,12 @@ go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= -golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= -golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= -golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= -golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= -golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= -golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= +golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c= +golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U= +golang.org/x/mod v0.42.0 h1:ICeL3t2L30ljSPHHxDnR4fqVcBt/zR2zJAb9juavmQg= +golang.org/x/mod v0.42.0/go.mod h1:u5fzIrRInkL8MaO1cbRkUHT64v303YIT5KEqpNr7jRs= +golang.org/x/net v0.63.0 h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0= +golang.org/x/net v0.63.0/go.mod h1:15JLg3IX1bLjHK264EZQEbIpTiR/KVLuo9CTRWd0pig= golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs= golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -290,10 +290,10 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs= golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= -golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= -golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= -golang.org/x/tools v0.51.0 h1:k4Xc/1Om9jwkBJBo4NVLMSARBoWtK10mx+W5BnXCeAI= -golang.org/x/tools v0.51.0/go.mod h1:9eEncMayCV6zRMGhR5eZEC2iBx98qWcF1HZ9Z7wJOoA= +golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo= +golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY= +golang.org/x/tools v0.52.0 h1:ryxg4U63oaUYk7uOLTF37n43f4qgtGvqV4Ioit1BaEs= +golang.org/x/tools v0.52.0/go.mod h1:ItcP5UNaVGG+Yc4eIYmaFLNJ4soEopkx5Y2d4lcEurs= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc h1:4bNTbnb44EqGVy9HaQxSY2jnafSUdgV3qHtedvNpDKg=