From e0b514c1e7ab5a7780967c5c7a5d9ccef735ba1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 15:56:38 +0000 Subject: [PATCH] Bump github.com/cloudfoundry/bosh-utils from 0.0.380 to 0.0.381 Bumps [github.com/cloudfoundry/bosh-utils](https://github.com/cloudfoundry/bosh-utils) from 0.0.380 to 0.0.381. - [Commits](https://github.com/cloudfoundry/bosh-utils/compare/v0.0.380...v0.0.381) --- updated-dependencies: - dependency-name: github.com/cloudfoundry/bosh-utils dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 8 ++-- .../x/tools/internal/gcimporter/iexport.go | 40 ++++++++++--------- vendor/modules.txt | 4 +- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 64e5466f2..f58b5de37 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/cloudfoundry-community/go-uaa v0.3.2-0.20230202170949-a3819b81bf7e github.com/cloudfoundry/bosh-cli/v7 v7.3.1 - github.com/cloudfoundry/bosh-utils v0.0.380 + github.com/cloudfoundry/bosh-utils v0.0.381 github.com/craigfurman/herottp v0.0.0-20190418132442-c546d62f2a8d github.com/gorilla/mux v1.8.0 github.com/maxbrunsfeld/counterfeiter/v6 v6.6.2 @@ -55,7 +55,7 @@ require ( golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.11.1 // indirect + golang.org/x/tools v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 2794d8839..1f6f359ea 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,8 @@ github.com/cloudfoundry-community/go-uaa v0.3.2-0.20230202170949-a3819b81bf7e h1 github.com/cloudfoundry-community/go-uaa v0.3.2-0.20230202170949-a3819b81bf7e/go.mod h1:CZikL3h0Li3DtqoZULq6/bW4KIJsM1FOVxVLSEHROik= github.com/cloudfoundry/bosh-cli/v7 v7.3.1 h1:Uf2shJ/QPGeLCCRIT2wCA9yM7yv7OlozKYftDtOYlOY= github.com/cloudfoundry/bosh-cli/v7 v7.3.1/go.mod h1:C6YH4jEdp9UczL9OfXGr51+iYhybzibDcjWOQNjhuto= -github.com/cloudfoundry/bosh-utils v0.0.380 h1:X5TKXrx0g+k1/B4VCQIRZWRTptRLFK/TZraWGb+Lxv4= -github.com/cloudfoundry/bosh-utils v0.0.380/go.mod h1:4+2bpZGAWbTlCh2DuqwHpCiBQz9+IO6rNhU6o7rAPF4= +github.com/cloudfoundry/bosh-utils v0.0.381 h1:YkAQ1XmY2noNeivb4G5+DhvUFemAspKeNELevIgXAOI= +github.com/cloudfoundry/bosh-utils v0.0.381/go.mod h1:+arJdltnFAOXuTf10pm9TqqLTOr41hdhAVPp8uG5m3s= github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e h1:FQdRViaoDphGRfgrotl2QGsX1gbloe57dbGBS5CG6KY= github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e/go.mod h1:PXmcacyJB/pJjSxEl15IU6rEIKXrhZQRzsr0UTkgNNs= github.com/cloudfoundry/socks5-proxy v0.2.95 h1:KTzJUD15H1ho9u6KdXzmOg9vr9LgGQH8XUitOx3GryM= @@ -176,8 +176,8 @@ golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.11.1 h1:ojD5zOW8+7dOGzdnNgersm8aPfcDjhMp12UfG93NIMc= -golang.org/x/tools v0.11.1/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index 3e3fce173..6103dd710 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -46,7 +46,7 @@ func IExportShallow(fset *token.FileSet, pkg *types.Package, reportf ReportFunc) // TODO(adonovan): use byte slices throughout, avoiding copying. const bundle, shallow = false, true var out bytes.Buffer - err := iexportCommon(&out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}, reportf) + err := iexportCommon(&out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}) return out.Bytes(), err } @@ -86,16 +86,16 @@ const bundleVersion = 0 // 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) + return iexportCommon(out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}) } // 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) + return iexportCommon(out, fset, bundle, shallow, iexportVersion, pkgs) } -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, bundle, shallow bool, version int, pkgs []*types.Package) (err error) { if !debug { defer func() { if e := recover(); e != nil { @@ -113,7 +113,6 @@ func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, ver fset: fset, version: version, shallow: shallow, - reportf: reportf, allPkgs: map[*types.Package]bool{}, stringIndex: map[string]uint64{}, declIndex: map[types.Object]uint64{}, @@ -330,7 +329,6 @@ 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 - reportf ReportFunc // if non-nil, used to report bugs localpkg *types.Package // (nil in bundle mode) // allPkgs tracks all packages that have been referenced by @@ -917,22 +915,26 @@ func (w *exportWriter) objectPath(obj types.Object) { objectPath, err := w.p.objectpathEncoder().For(obj) if err != nil { // Fall back to the empty string, which will cause the importer to create a - // new object. + // new object, which matches earlier behavior. Creating a new object is + // sufficient for many purposes (such as type checking), but causes certain + // references algorithms to fail (golang/go#60819). However, we didn't + // notice this problem during months of gopls@v0.12.0 testing. // - // This is incorrect in shallow mode (golang/go#60819), but matches - // the previous behavior. This code is defensive, as it is hard to - // prove that the objectpath algorithm will succeed in all cases, and - // creating a new object sort of works. - // (we didn't notice the bug during months of gopls@v0.12.0 testing) + // TODO(golang/go#61674): this workaround is insufficient, as in the case + // where the field forwarded from an instantiated type that may not appear + // in the export data of the original package: // - // However, report a bug so that we can eventually have confidence - // that export/import is producing a correct package. + // // package a + // type A[P any] struct{ F P } // - // TODO: remove reportf once we have such confidence. - objectPath = "" - if w.p.reportf != nil { - w.p.reportf("unable to encode object %q in package %q: %v", obj.Name(), obj.Pkg().Path(), err) - } + // // package b + // type B a.A[int] + // + // We need to update references algorithms not to depend on this + // de-duplication, at which point we may want to simply remove the + // workaround here. + w.string("") + return } w.string(string(objectPath)) w.pkg(obj.Pkg()) diff --git a/vendor/modules.txt b/vendor/modules.txt index 845933052..91aaa42dd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -35,7 +35,7 @@ github.com/cloudfoundry/bosh-cli/v7/common/util github.com/cloudfoundry/bosh-cli/v7/director github.com/cloudfoundry/bosh-cli/v7/io github.com/cloudfoundry/bosh-cli/v7/uaa -# github.com/cloudfoundry/bosh-utils v0.0.380 +# github.com/cloudfoundry/bosh-utils v0.0.381 ## explicit; go 1.20 github.com/cloudfoundry/bosh-utils/crypto github.com/cloudfoundry/bosh-utils/errors @@ -249,7 +249,7 @@ golang.org/x/text/internal/utf8internal golang.org/x/text/language golang.org/x/text/runes golang.org/x/text/transform -# golang.org/x/tools v0.11.1 +# golang.org/x/tools v0.12.0 ## explicit; go 1.18 golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/ast/inspector