Skip to content

Commit cdafba7

Browse files
authored
Update Go SDKs (#4272)
**What type of PR is this?** Other **What does this PR do? Why is it needed?** Update WORKSPACE to 1.24.0 to starting testing and bump the default SDK with Bzlmod to 1.23.6 in line with our policy to use the latest minor version of the oldest maintained release. **Which issues(s) does this PR fix?** Fixes #4267 **Other notes for review**
1 parent 29e3973 commit cdafba7

File tree

10 files changed

+149263
-115809
lines changed

10 files changed

+149263
-115809
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bazel_dep(name = "rules_shell", version = "0.3.0")
1818
go_sdk = use_extension("//go:extensions.bzl", "go_sdk")
1919
go_sdk.download(
2020
name = "go_default_sdk",
21-
version = "1.22.7",
21+
version = "1.23.6",
2222
)
2323
use_repo(
2424
go_sdk,

WORKSPACE

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ bazel_features_deps()
2727

2828
go_rules_dependencies()
2929

30-
go_register_toolchains(version = "1.23.1")
30+
go_register_toolchains(version = "1.24.0")
31+
32+
# Required since nogo depends on golang.org/x/tools, which needs to be at
33+
# least version 0.30.0 to be compatible with Go 1.24, but references
34+
# types.Info.FileVersions, which was only added to Go 1.22.
3135

3236
go_download_sdk(
3337
name = "rules_go_internal_compatibility_sdk",
34-
version = "1.19.13",
38+
version = "1.22.12",
3539
)
3640

3741
go_register_nogo(

go/private/repositories.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ def go_rules_dependencies(force = False):
6565
wrapper(
6666
http_archive,
6767
name = "org_golang_x_tools",
68-
# v0.21.0, latest as of 2024-05-20
68+
# v0.30.0, latest as of 2025-02-13
6969
urls = [
70-
"https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/v0.21.0.zip",
71-
"https://github.com/golang/tools/archive/refs/tags/v0.21.0.zip",
70+
"https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/v0.30.0.zip",
71+
"https://github.com/golang/tools/archive/refs/tags/v0.30.0.zip",
7272
],
73-
sha256 = "3e679aad1044575b90c14d13f2caa27840e46b38ac2a1dd391937300af56467a",
74-
strip_prefix = "tools-0.21.0",
73+
sha256 = "0736b1a0aa28f48074891a0f93cef5396575dbd73b9b5cdc4de54b2a3bfa4b4b",
74+
strip_prefix = "tools-0.30.0",
7575
patches = [
7676
# deletegopls removes the gopls subdirectory. It contains a nested
7777
# module with additional dependencies. It's not needed by rules_go.

tests/core/compatibility/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ go_binary(
77

88
go_cross_binary(
99
name = "hello_old",
10-
sdk_version = "1.19",
10+
sdk_version = "1.22",
1111
target = ":hello",
1212
)

tests/integration/popular_repos/BUILD.bazel

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ test_suite(
3434
"@org_golang_x_crypto//chacha20poly1305:chacha20poly1305_test",
3535
"@org_golang_x_crypto//cryptobyte:cryptobyte_test",
3636
"@org_golang_x_crypto//curve25519:curve25519_test",
37-
"@org_golang_x_crypto//curve25519/internal/field:field_test",
3837
"@org_golang_x_crypto//ed25519:ed25519_test",
3938
"@org_golang_x_crypto//hkdf:hkdf_test",
4039
"@org_golang_x_crypto//internal/alias:alias_test",
@@ -176,14 +175,12 @@ test_suite(
176175
"@org_golang_x_tools//go/analysis/passes/internal/analysisutil:analysisutil_test",
177176
"@org_golang_x_tools//go/ast/astutil:astutil_test",
178177
"@org_golang_x_tools//go/callgraph:callgraph_test",
179-
"@org_golang_x_tools//go/callgraph/static:static_test",
180178
"@org_golang_x_tools//go/callgraph/vta/internal/trie:trie_test",
181179
"@org_golang_x_tools//godoc/redirect:redirect_test",
182180
"@org_golang_x_tools//godoc/vfs:vfs_test",
183181
"@org_golang_x_tools//godoc/vfs/gatefs:gatefs_test",
184182
"@org_golang_x_tools//godoc/vfs/mapfs:mapfs_test",
185183
"@org_golang_x_tools//internal/aliases:aliases_test",
186-
"@org_golang_x_tools//internal/analysisinternal:analysisinternal_test",
187184
"@org_golang_x_tools//internal/bisect:bisect_test",
188185
"@org_golang_x_tools//internal/diff:diff_test",
189186
"@org_golang_x_tools//internal/diff/lcs:lcs_test",
@@ -195,12 +192,14 @@ test_suite(
195192
"@org_golang_x_tools//internal/event/export/ocagent/wire:wire_test",
196193
"@org_golang_x_tools//internal/event/keys:keys_test",
197194
"@org_golang_x_tools//internal/event/label:label_test",
198-
"@org_golang_x_tools//internal/fuzzy:fuzzy_test",
199195
"@org_golang_x_tools//internal/gopathwalk:gopathwalk_test",
200196
"@org_golang_x_tools//internal/jsonrpc2:jsonrpc2_test",
201197
"@org_golang_x_tools//internal/jsonrpc2/servertest:servertest_test",
202198
"@org_golang_x_tools//internal/jsonrpc2_v2:jsonrpc2_v2_test",
203199
"@org_golang_x_tools//internal/memoize:memoize_test",
200+
"@org_golang_x_tools//internal/modindex:modindex_test",
201+
"@org_golang_x_tools//internal/packagestest/testdata:testdata_test",
202+
"@org_golang_x_tools//internal/pkgbits:pkgbits_test",
204203
"@org_golang_x_tools//internal/proxydir:proxydir_test",
205204
"@org_golang_x_tools//internal/robustio:robustio_test",
206205
"@org_golang_x_tools//internal/stack:stack_test",
@@ -270,13 +269,13 @@ build_test(
270269
"@org_golang_x_tools//cmd/file2fuzz:file2fuzz",
271270
"@org_golang_x_tools//cmd/fiximports:fiximports",
272271
"@org_golang_x_tools//cmd/gonew:gonew",
273-
"@org_golang_x_tools//cmd/gorename:gorename",
274272
"@org_golang_x_tools//cmd/signature-fuzzer/fuzz-driver:fuzz-driver",
275273
"@org_golang_x_tools//cmd/signature-fuzzer/fuzz-runner:fuzz-runner",
276274
"@org_golang_x_tools//cmd/stringer:stringer",
277275
"@org_golang_x_tools//container/intsets:intsets",
278276
"@org_golang_x_tools//copyright:copyright",
279277
"@org_golang_x_tools//go/analysis/analysistest:analysistest",
278+
"@org_golang_x_tools//go/analysis/checker:checker",
280279
"@org_golang_x_tools//go/analysis/multichecker:multichecker",
281280
"@org_golang_x_tools//go/analysis/passes/asmdecl:asmdecl",
282281
"@org_golang_x_tools//go/analysis/passes/appends:appends",
@@ -325,11 +324,13 @@ build_test(
325324
"@org_golang_x_tools//go/analysis/passes/unusedwrite:unusedwrite",
326325
"@org_golang_x_tools//go/analysis/passes/timeformat:timeformat",
327326
"@org_golang_x_tools//go/analysis/passes/usesgenerics:usesgenerics",
327+
"@org_golang_x_tools//go/analysis/passes/waitgroup:waitgroup",
328328
"@org_golang_x_tools//go/analysis/unitchecker:unitchecker",
329329
"@org_golang_x_tools//go/ast/inspector:inspector",
330330
"@org_golang_x_tools//go/buildutil:buildutil",
331331
"@org_golang_x_tools//go/callgraph/cha:cha",
332332
"@org_golang_x_tools//go/callgraph/rta:rta",
333+
"@org_golang_x_tools//go/callgraph/static:static",
333334
"@org_golang_x_tools//go/callgraph/vta:vta",
334335
"@org_golang_x_tools//go/cfg:cfg",
335336
"@org_golang_x_tools//go/expect:expect",

tests/integration/popular_repos/README.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ This runs tests from the repository `golang.org/x/crypto <https://golang.org/x/c
2626
* @org_golang_x_crypto//chacha20poly1305:chacha20poly1305_test
2727
* @org_golang_x_crypto//cryptobyte:cryptobyte_test
2828
* @org_golang_x_crypto//curve25519:curve25519_test
29-
* @org_golang_x_crypto//curve25519/internal/field:field_test
3029
* @org_golang_x_crypto//ed25519:ed25519_test
3130
* @org_golang_x_crypto//hkdf:hkdf_test
3231
* @org_golang_x_crypto//internal/alias:alias_test
@@ -172,14 +171,12 @@ This runs tests from the repository `golang.org/x/tools <https://golang.org/x/to
172171
* @org_golang_x_tools//go/analysis/passes/internal/analysisutil:analysisutil_test
173172
* @org_golang_x_tools//go/ast/astutil:astutil_test
174173
* @org_golang_x_tools//go/callgraph:callgraph_test
175-
* @org_golang_x_tools//go/callgraph/static:static_test
176174
* @org_golang_x_tools//go/callgraph/vta/internal/trie:trie_test
177175
* @org_golang_x_tools//godoc/redirect:redirect_test
178176
* @org_golang_x_tools//godoc/vfs:vfs_test
179177
* @org_golang_x_tools//godoc/vfs/gatefs:gatefs_test
180178
* @org_golang_x_tools//godoc/vfs/mapfs:mapfs_test
181179
* @org_golang_x_tools//internal/aliases:aliases_test
182-
* @org_golang_x_tools//internal/analysisinternal:analysisinternal_test
183180
* @org_golang_x_tools//internal/bisect:bisect_test
184181
* @org_golang_x_tools//internal/diff:diff_test
185182
* @org_golang_x_tools//internal/diff/lcs:lcs_test
@@ -191,12 +188,14 @@ This runs tests from the repository `golang.org/x/tools <https://golang.org/x/to
191188
* @org_golang_x_tools//internal/event/export/ocagent/wire:wire_test
192189
* @org_golang_x_tools//internal/event/keys:keys_test
193190
* @org_golang_x_tools//internal/event/label:label_test
194-
* @org_golang_x_tools//internal/fuzzy:fuzzy_test
195191
* @org_golang_x_tools//internal/gopathwalk:gopathwalk_test
196192
* @org_golang_x_tools//internal/jsonrpc2:jsonrpc2_test
197193
* @org_golang_x_tools//internal/jsonrpc2/servertest:servertest_test
198194
* @org_golang_x_tools//internal/jsonrpc2_v2:jsonrpc2_v2_test
199195
* @org_golang_x_tools//internal/memoize:memoize_test
196+
* @org_golang_x_tools//internal/modindex:modindex_test
197+
* @org_golang_x_tools//internal/packagestest/testdata:testdata_test
198+
* @org_golang_x_tools//internal/pkgbits:pkgbits_test
200199
* @org_golang_x_tools//internal/proxydir:proxydir_test
201200
* @org_golang_x_tools//internal/robustio:robustio_test
202201
* @org_golang_x_tools//internal/stack:stack_test

tests/integration/popular_repos/popular_repos.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def popular_repos():
2727
go_repository,
2828
name = "org_golang_x_crypto",
2929
importpath = "golang.org/x/crypto",
30-
commit = "0d375be9b61cb69eb94173d0375a05e90875bbf6",
30+
commit = "e47973b1c1089f6c67ab89261f7aa067b3d611d2",
3131
)
3232
_maybe(
3333
go_repository,

tests/integration/popular_repos/popular_repos.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
from subprocess import check_output, call
17-
from sys import exit
1816
from os import path
17+
from subprocess import check_output
1918

2019
POPULAR_REPOS = [
2120
dict(
2221
name = "org_golang_x_crypto",
2322
importpath = "golang.org/x/crypto",
24-
commit = "0d375be9b61cb69eb94173d0375a05e90875bbf6",
23+
commit = "e47973b1c1089f6c67ab89261f7aa067b3d611d2",
2524
excludes = [
2625
"internal/wycheproof:wycheproof_test", # requires build cache
2726
"nacl/secretbox:secretbox_test", # panics in salsa2020_amd64.s
@@ -89,7 +88,6 @@
8988
"cmd/deadcode:deadcode_test", # Needs GOROOT
9089
"cmd/godoc:godoc_test", # TODO(#417)
9190
"cmd/gonew:gonew_test", # requires build cache
92-
"cmd/gorename:gorename_test", # TODO(#417)
9391
"cmd/guru/testdata/src/referrers:referrers_test", # Not a real test
9492
# "cmd/guru:guru_test", # Needs testdata directory
9593
"cmd/signature-fuzzer/fuzz-driver:fuzz-driver_test", # requires working GOROOT
@@ -99,6 +97,7 @@
9997
"container/intsets:intsets_test", # TODO(#413): External test depends on symbols defined in internal test.
10098
"copyright:copyright_test", # # requires runfiles
10199
"go/analysis/analysistest:analysistest_test", # requires build cache
100+
"go/analysis/checker:checker_test", # Needs go tool
102101
"go/analysis/internal/analysisflags:analysisflags_test", # calls os.Exit(0) in a test
103102
"go/analysis/internal/checker:checker_test", # loads test package with go/packages, which probably needs go list
104103
"go/analysis/internal/versiontest:versiontest_test", # Needs GOROOT
@@ -155,11 +154,13 @@
155154
"go/analysis/passes/unusedwrite:unusedwrite_test", # Needs testdata directory
156155
"go/analysis/passes/timeformat:timeformat_test", # Needs go tool
157156
"go/analysis/passes/usesgenerics:usesgenerics_test", # Needs go tool
157+
"go/analysis/passes/waitgroup:waitgroup_test", # Needs go tool
158158
"go/analysis/unitchecker:unitchecker_test", # requires go vet
159159
"go/ast/inspector:inspector_test", # requires GOROOT and GOPATH
160160
"go/buildutil:buildutil_test", # Needs testdata directory
161161
"go/callgraph/cha:cha_test", # Needs testdata directory
162162
"go/callgraph/rta:rta_test", # Needs testdata directory
163+
"go/callgraph/static:static_test", # Needs go tool
163164
"go/callgraph/vta:vta_test", # Needs testdata directory
164165
"go/cfg:cfg_test", # Needs GOROOT
165166
"go/expect:expect_test", # Needs testdata directory
@@ -180,13 +181,19 @@
180181
"godoc/static:static_test", # requires data files
181182
"godoc/vfs/zipfs:zipfs_test", # requires GOROOT
182183
"godoc:godoc_test", # requires GOROOT and GOPATH
184+
"internal/analysisinternal:analysisinternal_test", # requires GOROOT and GOPATH
183185
"internal/apidiff:apidiff_test", # Needs testdata directory
186+
"internal/astutil/cursor:cursor_test", # requires GOROOT
184187
"internal/diff/difftest:difftest_test", # Needs diff tool
185188
"internal/diffp:diffp_test", # Needs testdata directory
189+
"internal/drivertest:drivertest_test", # Needs go tool
190+
"internal/expect:expect_test", # Needs testdata directory
186191
"internal/facts:facts_test", # loads test package with go/packages, which probably needs go list
187192
"internal/gcimporter:gcimporter_test", # Needs testdata directory
188193
"internal/gocommand:gocommand_test", # Needs go tool
189194
"internal/imports:imports_test", # Needs testdata directory
195+
"internal/packagestest:packagestest_test", # Needs go tool
196+
"internal/packagestest/testdata/groups/two/primarymod/expect:expect_test",
190197
"internal/pprof:pprof_test", # Needs testdata directory
191198
"internal/refactor/inline:inline_test", # Needs GOROOT
192199
"internal/refactor/inline/analyzer:analyzer_test", # Needs GOROOT

0 commit comments

Comments
 (0)