Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
upgrade x/tools v0.14.0
upgrade x/sys   v0.13.0

Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei authored and fmeum committed Nov 1, 2023
1 parent 4211c6d commit d9ed41f
Show file tree
Hide file tree
Showing 9 changed files with 54,898 additions and 39,240 deletions.
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ require (
)

require (
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/grpc v1.50.0 // indirect
)
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -65,10 +67,14 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
Expand All @@ -78,6 +84,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
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=
Expand Down
20 changes: 10 additions & 10 deletions go/private/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_x_tools",
# v0.7.0, latest as of 2023-03-27
# v0.14.0, latest as of 2023-10-29
urls = [
"https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/v0.7.0.zip",
"https://github.com/golang/tools/archive/refs/tags/v0.7.0.zip",
"https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/v0.14.0.zip",
"https://github.com/golang/tools/archive/refs/tags/v0.14.0.zip",
],
sha256 = "9f20a20f29f4008d797a8be882ef82b69cf8f7f2b96dbdfe3814c57d8280fa4b",
strip_prefix = "tools-0.7.0",
sha256 = "9c71911c61a791d8b13368ffbc409a0b38859cac80a4b5039487d2a27399e8b9",
strip_prefix = "tools-0.14.0",
patches = [
# deletegopls removes the gopls subdirectory. It contains a nested
# module with additional dependencies. It's not needed by rules_go.
Expand Down Expand Up @@ -105,13 +105,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_x_sys",
# v0.12.0, latest as of 2023-09-18
# v0.13.0, latest as of 2023-10-29
urls = [
"https://mirror.bazel.build/github.com/golang/sys/archive/refs/tags/v0.12.0.zip",
"https://github.com/golang/sys/archive/refs/tags/v0.12.0.zip",
"https://mirror.bazel.build/github.com/golang/sys/archive/refs/tags/v0.13.0.zip",
"https://github.com/golang/sys/archive/refs/tags/v0.13.0.zip",
],
sha256 = "229b079d23d18f5b1a0c46335020cddc6e5d543da2dae6e45b59d84b5d074e3a",
strip_prefix = "sys-0.12.0",
sha256 = "24abdcbecddb288fb1007f8cb814b1592531d5bb62817bc30925e3175f3f5749",
strip_prefix = "sys-0.13.0",
patches = [
# releaser:patch-cmd gazelle -repo_root . -go_prefix golang.org/x/sys -go_naming_convention import_alias
Label("//third_party:org_golang_x_sys-gazelle.patch"),
Expand Down
8 changes: 4 additions & 4 deletions go/tools/builders/nogo_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func checkPackage(analyzers []*analysis.Analyzer, packagePath string, packageFil

// Process diagnostics and encode facts for importers of this package.
diagnostics := checkAnalysisResults(roots, pkg)
facts := pkg.facts.Encode()
facts := pkg.facts.Encode(true/* skipMethodSorting */)
return diagnostics, facts, nil
}

Expand Down Expand Up @@ -396,7 +396,7 @@ func load(packagePath string, imp *importer, filenames []string) (*goPackage, er
}
pkg.types, pkg.typesInfo = types, info

pkg.facts, err = facts.NewDecoder(pkg.types).Decode(imp.readFacts)
pkg.facts, err = facts.NewDecoder(pkg.types).Decode(true/* skipMethodSorting */, imp.readFacts)
if err != nil {
return nil, fmt.Errorf("internal error decoding facts: %v", err)
}
Expand Down Expand Up @@ -609,8 +609,8 @@ func (i *importer) Import(path string) (*types.Package, error) {
return gcexportdata.Read(r, i.fset, i.packageCache, path)
}

func (i *importer) readFacts(pkg *types.Package) ([]byte, error) {
archive := i.factMap[pkg.Path()]
func (i *importer) readFacts(pkgPath string) ([]byte, error) {
archive := i.factMap[pkgPath]
if archive == "" {
// Packages that were not built with the nogo toolchain will not be
// analyzed, so there's no opportunity to store facts. This includes
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/popular_repos/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ test_suite(
tests = [
"@org_golang_x_sys//cpu:cpu_test",
"@org_golang_x_sys//execabs:execabs_test",
"@org_golang_x_sys//internal/unsafeheader:unsafeheader_test",
"@org_golang_x_sys//plan9:plan9_test",
"@org_golang_x_sys//unix/internal/mkmerge:mkmerge_test",
"@org_golang_x_sys//windows/mkwinsyscall:mkwinsyscall_test",
Expand Down Expand Up @@ -193,8 +192,6 @@ test_suite(
"@org_golang_x_tools//internal/jsonrpc2:jsonrpc2_test",
"@org_golang_x_tools//internal/jsonrpc2/servertest:servertest_test",
"@org_golang_x_tools//internal/jsonrpc2_v2:jsonrpc2_v2_test",
"@org_golang_x_tools//internal/lockedfile:lockedfile_test",
"@org_golang_x_tools//internal/lockedfile/internal/filelock:filelock_test",
"@org_golang_x_tools//internal/memoize:memoize_test",
"@org_golang_x_tools//internal/persistent:persistent_test",
"@org_golang_x_tools//internal/proxydir:proxydir_test",
Expand Down
3 changes: 0 additions & 3 deletions tests/integration/popular_repos/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ This runs tests from the repository `golang.org/x/sys <https://golang.org/x/sys>

* @org_golang_x_sys//cpu:cpu_test
* @org_golang_x_sys//execabs:execabs_test
* @org_golang_x_sys//internal/unsafeheader:unsafeheader_test
* @org_golang_x_sys//plan9:plan9_test
* @org_golang_x_sys//unix/internal/mkmerge:mkmerge_test
* @org_golang_x_sys//windows/mkwinsyscall:mkwinsyscall_test
Expand Down Expand Up @@ -191,8 +190,6 @@ This runs tests from the repository `golang.org/x/tools <https://golang.org/x/to
* @org_golang_x_tools//internal/jsonrpc2:jsonrpc2_test
* @org_golang_x_tools//internal/jsonrpc2/servertest:servertest_test
* @org_golang_x_tools//internal/jsonrpc2_v2:jsonrpc2_v2_test
* @org_golang_x_tools//internal/lockedfile:lockedfile_test
* @org_golang_x_tools//internal/lockedfile/internal/filelock:filelock_test
* @org_golang_x_tools//internal/memoize:memoize_test
* @org_golang_x_tools//internal/persistent:persistent_test
* @org_golang_x_tools//internal/proxydir:proxydir_test
Expand Down
15 changes: 3 additions & 12 deletions third_party/org_golang_x_sys-gazelle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ diff -urN a/unix/internal/mkmerge/BUILD.bazel b/unix/internal/mkmerge/BUILD.baze
diff -urN a/windows/BUILD.bazel b/windows/BUILD.bazel
--- a/windows/BUILD.bazel 1970-01-01 00:00:00.000000000 +0000
+++ b/windows/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,60 @@
@@ -0,0 +1,53 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
Expand Down Expand Up @@ -535,12 +535,6 @@ diff -urN a/windows/BUILD.bazel b/windows/BUILD.bazel
+ ],
+ importpath = "golang.org/x/sys/windows",
+ visibility = ["//visibility:public"],
+ deps = select({
+ "@io_bazel_rules_go//go/platform:windows": [
+ "//internal/unsafeheader",
+ ],
+ "//conditions:default": [],
+ }),
+)
+
+alias(
Expand All @@ -559,7 +553,6 @@ diff -urN a/windows/BUILD.bazel b/windows/BUILD.bazel
+ deps = select({
+ "@io_bazel_rules_go//go/platform:windows": [
+ ":windows",
+ "//internal/unsafeheader",
+ ],
+ "//conditions:default": [],
+ }),
Expand Down Expand Up @@ -629,7 +622,7 @@ diff -urN a/windows/registry/BUILD.bazel b/windows/registry/BUILD.bazel
diff -urN a/windows/svc/BUILD.bazel b/windows/svc/BUILD.bazel
--- a/windows/svc/BUILD.bazel 1970-01-01 00:00:00.000000000 +0000
+++ b/windows/svc/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,36 @@
@@ -0,0 +1,35 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
Expand All @@ -642,7 +635,6 @@ diff -urN a/windows/svc/BUILD.bazel b/windows/svc/BUILD.bazel
+ visibility = ["//visibility:public"],
+ deps = select({
+ "@io_bazel_rules_go//go/platform:windows": [
+ "//internal/unsafeheader",
+ "//windows",
+ ],
+ "//conditions:default": [],
Expand Down Expand Up @@ -768,7 +760,7 @@ diff -urN a/windows/svc/example/BUILD.bazel b/windows/svc/example/BUILD.bazel
diff -urN a/windows/svc/mgr/BUILD.bazel b/windows/svc/mgr/BUILD.bazel
--- a/windows/svc/mgr/BUILD.bazel 1970-01-01 00:00:00.000000000 +0000
+++ b/windows/svc/mgr/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,40 @@
@@ -0,0 +1,39 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
Expand All @@ -783,7 +775,6 @@ diff -urN a/windows/svc/mgr/BUILD.bazel b/windows/svc/mgr/BUILD.bazel
+ visibility = ["//visibility:public"],
+ deps = select({
+ "@io_bazel_rules_go//go/platform:windows": [
+ "//internal/unsafeheader",
+ "//windows",
+ "//windows/svc",
+ ],
Expand Down
Loading

0 comments on commit d9ed41f

Please sign in to comment.