Skip to content

Commit 5200a61

Browse files
authored
Raise minimum Bazel version to 6.5.0 (bazel-contrib#4171)
Many other rulesets (such as rules_java and protobuf) have dropped support for Bazel 5. We also drop support for Bzlmod with Bazel 6 due to rules_jvm_external doing so. This should unblock bazel-contrib#4141. Also remove unnecessary CI exclusions.
1 parent 0ed551c commit 5200a61

File tree

5 files changed

+32
-214
lines changed

5 files changed

+32
-214
lines changed

.bazelci/presubmit.yml

+28-211
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,20 @@ matrix:
77
- windows
88

99
tasks:
10-
ubuntu1804_bazel400:
10+
ubuntu1804_bazel6:
1111
platform: ubuntu1804
12-
bazel: 5.4.0 # test minimum supported version of bazel
12+
bazel: 6.5.0 # test minimum supported version of bazel
1313
build_targets:
1414
- "//..."
15-
- "--"
16-
- "-//tests/core/cross:darwin_go_cross_cgo" # Doesn't work before bazel 6
17-
- "-//tests/core/cross:linux_go_cross_cgo" # Doesn't work before bazel 6
18-
- "-//tests/core/cross:windows_go_cross_cgo" # Doesn't work before bazel 6
19-
- "-//tests/core/starlark/cgo/..." # Doesn't work before bazel 6
2015
test_targets:
2116
- "//..."
22-
- "-//tests/core/cross:darwin_go_cross_cgo" # Doesn't work before bazel 6
23-
- "-//tests/core/cross:linux_go_cross_cgo" # Doesn't work before bazel 6
24-
- "-//tests/core/cross:windows_go_cross_cgo" # Doesn't work before bazel 6
25-
- "-//tests/core/starlark/cgo/..." # Doesn't work before bazel 6
26-
# Bzlmod tests require Bazel 6+
27-
- "-//tests/core/nogo/bzlmod/..."
28-
# Nogo includes/excludes doesn't work before bazel 6
17+
# Nogo includes/excludes doesn't work before bazel 7
2918
- "-//tests/core/nogo/includes_excludes:includes_exclude_test"
19+
- "-//tests/core/nogo/bzlmod:includes_exclude_test"
3020
# _repo_mapping is missing
3121
- "-//tests/runfiles:runfiles_test"
22+
# TODO: Investigate why this fails.
23+
- "-//tests/core/starlark/cgo:missing_cc_toolchain_explicit_pure_off_test"
3224
ubuntu2004:
3325
# enable some unflipped incompatible flags on this platform to ensure we don't regress.
3426
build_flags:
@@ -37,10 +29,6 @@ tasks:
3729
- "--config=incompatible"
3830
build_targets:
3931
- "//..."
40-
- "--"
41-
- "-//tests/core/cross:darwin_go_cross_cgo" # Doesn't work before bazel 6
42-
- "-//tests/core/cross:linux_go_cross_cgo" # Doesn't work before bazel 6
43-
- "-//tests/core/cross:windows_go_cross_cgo" # Doesn't work before bazel 6
4432
test_targets:
4533
- "//..."
4634
debian11_zig_cc:
@@ -72,7 +60,6 @@ tasks:
7260
bcr_tests_proto:
7361
name: BCR test module (--incompatible_enable_proto_toolchain_resolution)
7462
platform: ${{ platform }}
75-
bazel: 7.1.1
7663
working_directory: tests/bcr
7764
build_flags:
7865
- "--allow_yanked_versions=all"
@@ -93,9 +80,6 @@ tasks:
9380
build_targets:
9481
- "//..."
9582
- "--"
96-
- "-//tests/core/cross:darwin_go_cross_cgo" # Doesn't work before bazel 6
97-
- "-//tests/core/cross:linux_go_cross_cgo" # Doesn't work before bazel 6
98-
- "-//tests/core/cross:windows_go_cross_cgo" # Doesn't work before bazel 6
9983
test_flags:
10084
- "--apple_crosstool_top=@local_config_apple_cc//:toolchain"
10185
- "--crosstool_top=@local_config_apple_cc//:toolchain"
@@ -105,10 +89,6 @@ tasks:
10589
rbe_ubuntu1604:
10690
build_targets:
10791
- "//..."
108-
- "--"
109-
- "-//tests/core/cross:darwin_go_cross_cgo" # Doesn't work before bazel 6
110-
- "-//tests/core/cross:linux_go_cross_cgo" # Doesn't work before bazel 6
111-
- "-//tests/core/cross:windows_go_cross_cgo" # Doesn't work before bazel 6
11292
test_flags:
11393
# Some tests depend on this feature being disabled. However, because it's
11494
# enabled by default in the rbe_ubuntu1604 platform, we cannot simply remove
@@ -128,157 +108,22 @@ tasks:
128108
build_flags:
129109
- '--action_env=PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\bin;C:\tools\msys64\mingw64\bin;C:\python3\Scripts\;C:\python3;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\tools\msys64\usr\bin;c:\openjdk\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\CMake\bin;c:\ninja;c:\bazel;c:\buildkite'
130110
build_targets:
131-
# BUG(bazelbuild/bazel#6485): Bazel 0.18.0 crashes when loading
132-
# @com_google_protobuf//:protobuf. We have to exclude everything that
133-
# transitively depends on it.
134-
# TODO(#1787): There is a cc_import target in //tests/core/cgo that
135-
# doesn't set the interface_library attribute. This causes an
136-
# analysis failure.
137-
# TODO(#1790): Tests that require data should use bazel.Runfile.
138-
# TODO(#2516): Tests that require protoc fail when protoc is built with mingw-gcc.
139-
- "--"
140111
- "//..."
141-
- "-@com_github_golang_protobuf//ptypes:go_default_library_gen"
142-
- "-@com_google_protobuf//:any_proto"
143-
- "-@com_google_protobuf//:api_proto"
144-
- "-@com_google_protobuf//:compiler_plugin_proto"
145-
- "-@com_google_protobuf//:descriptor_proto"
146-
- "-@com_google_protobuf//:duration_proto"
147-
- "-@com_google_protobuf//:empty_proto"
148-
- "-@com_google_protobuf//:field_mask_proto"
149-
- "-@com_google_protobuf//:protobuf"
150-
- "-@com_google_protobuf//:protoc"
151-
- "-@com_google_protobuf//:protoc_lib"
152-
- "-@com_google_protobuf//:source_context_proto"
153-
- "-@com_google_protobuf//:struct_proto"
154-
- "-@com_google_protobuf//:timestamp_proto"
155-
- "-@com_google_protobuf//:type_proto"
156-
- "-@com_google_protobuf//:wrappers_proto"
157-
- "-@gogo_special_proto//github.com/gogo/protobuf/gogoproto:gogoproto"
158-
- "-//go/tools/bazel:bazel_test"
159-
- "-@io_bazel_rules_go//proto:gogofaster_proto"
160-
- "-@io_bazel_rules_go//proto:go_grpc"
161-
- "-@io_bazel_rules_go//proto:go_proto"
162-
- "-@io_bazel_rules_go//proto:go_proto_bootstrap"
163-
- "-@org_golang_x_crypto//ed25519:ed25519_test"
164-
- "-@org_golang_x_crypto//sha3:sha3_test"
165-
- "-@org_golang_x_sys//windows/registry:registry_test"
166-
- "-@org_golang_x_sys//windows/svc/eventlog:eventlog_test"
167-
- "-@org_golang_x_sys//windows/svc:svc_test"
168-
- "-@org_golang_x_text//language:language_test"
169-
- "-//proto:combo_grpc"
170-
- "-//proto:combo_proto"
171-
- "-//proto:gofast_grpc"
172-
- "-//proto:gofast_proto"
173-
- "-//proto:gogofaster_grpc"
174-
- "-//proto:gogofaster_proto"
175-
- "-//proto:gogofast_grpc"
176-
- "-//proto:gogofast_proto"
177-
- "-//proto:gogo_grpc"
178-
- "-//proto:gogo_proto"
179-
- "-//proto:gogoslick_grpc"
180-
- "-//proto:gogoslick_proto"
181-
- "-//proto:gogotypes_grpc"
182-
- "-//proto:gogotypes_proto"
183-
- "-//proto:go_grpc"
184-
- "-//proto:go_proto"
185-
- "-//proto:go_proto_bootstrap"
186-
- "-//proto:gostring_grpc"
187-
- "-//proto:gostring_proto"
188-
- "-//proto/wkt:any_go_proto"
189-
- "-//proto/wkt:api_go_proto"
190-
- "-//proto/wkt:compiler_plugin_go_proto"
191-
- "-//proto/wkt:descriptor_go_proto"
192-
- "-//proto/wkt:duration_go_proto"
193-
- "-//proto/wkt:empty_go_proto"
194-
- "-//proto/wkt:field_mask_go_proto"
195-
- "-//proto/wkt:source_context_go_proto"
196-
- "-//proto/wkt:struct_go_proto"
197-
- "-//proto/wkt:timestamp_go_proto"
198-
- "-//proto/wkt:type_go_proto"
199-
- "-//proto/wkt:wrappers_go_proto"
200-
- "-//tests:buildifier_test" # transitively requires proto, doesn't build in CI
201-
- "-@test_chdir_remote//sub:go_default_test"
202-
- "-//tests/core/cgo:dylib_client"
203-
- "-//tests/core/cgo:dylib_test"
204112
- "-//tests/core/cgo:generated_dylib_client"
205113
- "-//tests/core/cgo:generated_dylib_test"
206-
- "-//tests/core/cgo:versioned_dylib_client"
207-
- "-//tests/core/cgo:versioned_dylib_test"
208-
- "-//tests/core/cgo:generated_versioned_dylib_client"
209114
- "-//tests/core/cgo:generated_versioned_dylib_test"
210-
- "-//tests/core/cross:proto_test"
211-
- "-//tests/core/go_path:go_path"
212-
- "-//tests/core/go_path:go_path_test"
213-
- "-//tests/core/go_path:nodata_path"
214-
- "-//tests/core/go_path:copy_path"
215-
- "-//tests/core/go_path:archive_path"
216-
- "-//tests/core/go_path/pkg/lib:vendored"
217-
- "-//tests/core/go_path/pkg/lib:go_default_test"
218-
- "-//tests/core/go_path/pkg/lib:go_default_library"
219-
- "-//tests/core/go_path/pkg/lib:embed_test"
220-
- "-//tests/core/go_path/pkg/lib:embed_lib"
221-
- "-//tests/core/go_path/cmd/bin:cross"
222-
- "-//tests/core/go_path/cmd/bin:bin"
223-
- "-//tests/core/go_plugin:go_plugin"
224-
- "-//tests/core/go_plugin:go_default_test"
225-
- "-//tests/core/go_plugin:plugin"
226-
- "-//tests/core/go_plugin_with_proto_library:go_plugin_with_proto_library"
227-
- "-//tests/core/go_plugin_with_proto_library:go_default_test"
228-
- "-//tests/core/go_plugin_with_proto_library:plugin"
229-
- "-//tests/core/go_proto_library:all"
230-
- "-//tests/core/go_proto_library_importmap:foo_go_proto"
231-
- "-//tests/core/go_proto_library_importmap:foo_proto"
232-
- "-//tests/core/go_proto_library_importmap:importmap_test"
233-
- "-//tests/core/go_test:data_test"
234-
- "-//tests/core/go_test:pwd_test"
235-
- "-//tests/core/race:race_test"
236-
- "-//tests/core/stdlib:buildid_test"
237-
- "-//tests/examples/executable_name:executable_name"
238-
- "-//tests/integration/googleapis:color_service"
239-
- "-//tests/integration/googleapis:color_service_go_proto"
240-
- "-//tests/integration/googleapis:color_service_proto"
241-
- "-//tests/integration/googleapis:color_service_test"
242-
- "-//tests/legacy/examples/cgo/example_command:example_command_test"
243-
- "-//tests/legacy/examples/cgo/example_command:example_command_script"
244-
- "-//tests/legacy/examples/cgo/example_command:example_command"
245115
- "-//tests/legacy/examples/cgo:generate_go_src"
246116
- "-//tests/legacy/examples/cgo:cgo_lib_test"
247117
- "-//tests/legacy/examples/cgo:go_default_library"
118+
- "-//tests/legacy/examples/cgo:sub"
248119
- "-//tests/legacy/examples/cgo/cc_dependency:version"
249120
- "-//tests/legacy/examples/cgo/cc_dependency:c_version_so"
250-
- "-//tests/legacy/examples/cgo:sub"
251-
- "-//tests/legacy/examples/proto/dep:useful_go_proto"
252-
- "-//tests/legacy/examples/proto/dep:useful_proto"
253-
- "-//tests/legacy/examples/proto/embed:embed_go_proto"
254-
- "-//tests/legacy/examples/proto/embed:embed_proto"
255-
- "-//tests/legacy/examples/proto/embed:go_default_library"
256-
- "-//tests/legacy/examples/proto:go_default_library"
257-
- "-//tests/legacy/examples/proto/gogo:gogo_test"
258-
- "-//tests/legacy/examples/proto/gogo:values_go_proto"
259-
- "-//tests/legacy/examples/proto/gogo:values_proto"
260-
- "-//tests/legacy/examples/proto/gostyle:gostyle_go_proto"
261-
- "-//tests/legacy/examples/proto/gostyle:gostyle_proto"
262-
- "-//tests/legacy/examples/proto/grpc:my_svc_go_proto"
263-
- "-//tests/legacy/examples/proto/grpc:my_svc_proto"
264-
- "-//tests/legacy/examples/proto/grpc:not_grpc"
265-
- "-//tests/legacy/examples/proto/grpc:test_grpc"
266-
- "-//tests/legacy/examples/proto/lib:lib_go_proto"
267-
- "-//tests/legacy/examples/proto/lib:lib_proto"
268-
- "-//tests/legacy/examples/proto:proto_pure_test"
269-
- "-//tests/legacy/examples/proto:proto_test"
270-
- "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
271-
- "-//tests/legacy/info:info"
272-
- "-//tests/legacy/proto_ignore_go_package_option:a_go_proto"
273-
- "-//tests/legacy/proto_ignore_go_package_option:a_proto"
274-
- "-//tests/legacy/proto_ignore_go_package_option:b_go_proto"
275-
- "-//tests/legacy/proto_ignore_go_package_option:b_proto"
276-
- "-//tests/legacy/test_chdir:go_default_test"
277-
- "-//tests/legacy/test_rundir:go_default_test"
278-
- "-//tests/legacy/transitive_data:go_default_test"
279-
- "-//tests/core/cross:darwin_go_cross_cgo" # Doesn't work before bazel 6
280-
- "-//tests/core/cross:linux_go_cross_cgo" # Doesn't work before bazel 6
281-
- "-//tests/core/cross:windows_go_cross_cgo" # Doesn't work before bazel 6
121+
- "-//tests/legacy/examples/cgo/example_command:example_command"
122+
- "-//tests/legacy/examples/cgo/example_command:example_command_script"
123+
- "-//tests/legacy/examples/cgo/example_command:example_command_test"
124+
# Plugins aren't supported on Windows.
125+
- "-//tests/core/go_plugin/..."
126+
- "-//tests/core/go_plugin_with_proto_library/..."
282127
test_flags:
283128
- '--action_env=PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\bin;C:\tools\msys64\mingw64\bin;C:\python3\Scripts\;C:\python3;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\tools\msys64\usr\bin;c:\openjdk\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\CMake\bin;c:\ninja;c:\bazel;c:\buildkite'
284129
# On Windows CI, bazel (bazelisk) needs %LocalAppData% to find the cache directory.
@@ -288,76 +133,48 @@ tasks:
288133
- "--test_env=GO_BAZEL_TEST_BAZELFLAGS=--cpu=x64_windows --compiler=mingw-gcc --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows_mingw --action_env=PATH --host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo --incompatible_enable_cc_toolchain_resolution"
289134
- "--test_env=PATH"
290135
test_targets:
291-
- "--"
292136
- "//..."
293-
- "-//go/tools/bazel:bazel_test"
294-
- "-@org_golang_x_crypto//ed25519:ed25519_test"
295-
- "-@org_golang_x_crypto//sha3:sha3_test"
296-
- "-@org_golang_x_net//ipv4:ipv4_test"
297-
- "-@org_golang_x_sys//windows/registry:registry_test"
298-
- "-@org_golang_x_sys//windows/svc/eventlog:eventlog_test"
299-
- "-@org_golang_x_sys//windows/svc:svc_test"
300-
- "-@org_golang_x_text//language:language_test"
301-
- "-@org_golang_x_tools//cmd/splitdwarf/internal/macho:macho_test"
302-
- "-@test_chdir_remote//sub:go_default_test"
303-
- "-//go/tools/builders:stdliblist_test" # fails on Windows due to #2491
304-
- "-//tests:buildifier_test" # requires bash
305-
- "-//tests/core/cgo:dylib_client"
306-
- "-//tests/core/cgo:dylib_test"
137+
- "-//go/tools/builders:stdliblist_test"
138+
- "-//tests:buildifier_test"
307139
- "-//tests/core/cgo:generated_dylib_client"
308140
- "-//tests/core/cgo:generated_dylib_test"
309-
- "-//tests/core/cgo:race_test" # fails on Windows due to upstream bug, see issue #2911
310-
- "-//tests/core/cgo:versioned_dylib_client"
311-
- "-//tests/core/cgo:versioned_dylib_test"
312-
- "-//tests/core/cgo:generated_versioned_dylib_client"
313141
- "-//tests/core/cgo:generated_versioned_dylib_test"
314142
- "-//tests/core/coverage:coverage_test"
315143
- "-//tests/core/coverage:issue3017_test"
316-
- "-//tests/core/cross:proto_test"
317144
- "-//tests/core/go_binary:go_default_test"
318-
- "-//tests/core/go_path:go_path"
319145
- "-//tests/core/go_path:go_path_test"
320-
- "-//tests/core/go_path/pkg/lib:embed_test"
321-
- "-//tests/core/go_path/pkg/lib:go_default_test"
322-
- "-//tests/core/go_plugin:go_plugin"
323-
- "-//tests/core/go_plugin:go_default_test"
324-
- "-//tests/core/go_plugin:plugin"
325-
- "-//tests/core/go_plugin_with_proto_library:go_plugin_with_proto_library"
326-
- "-//tests/core/go_plugin_with_proto_library:go_default_test"
327-
- "-//tests/core/go_plugin_with_proto_library:plugin"
328-
- "-//tests/core/go_proto_library:all"
329-
- "-//tests/core/go_proto_library_importmap:importmap_test"
330146
- "-//tests/core/go_test:data_test"
331147
- "-//tests/core/go_test:pwd_test"
332148
- "-//tests/core/nogo/coverage:coverage_cgo_test"
333149
- "-//tests/core/nogo/coverage:coverage_test"
334150
- "-//tests/core/nogo/coverage:gen_code_test"
335-
- "-//tests/core/race:race_test" # fails on Windows due to upstream bug, see issue #2911
336151
- "-//tests/core/stdlib:buildid_test"
337152
- "-//tests/examples/executable_name:executable_name"
338153
- "-//tests/integration/gazelle:gazelle_test" # exceeds command line length limit
339-
- "-//tests/integration/googleapis:color_service_test"
340154
- "-//tests/integration/reproducibility:reproducibility_test"
341-
- "-//tests/legacy/cgo_pthread_flag:go_default_test" # fails without error, passes locally. Problem with CI msys2?
342-
- "-//tests/legacy/examples/cgo/example_command:example_command_test"
343-
- "-//tests/legacy/examples/cgo/example_command:example_command_script"
344-
- "-//tests/legacy/examples/cgo/example_command:example_command"
345155
- "-//tests/legacy/examples/cgo:generate_go_src"
346156
- "-//tests/legacy/examples/cgo:cgo_lib_test"
347157
- "-//tests/legacy/examples/cgo:go_default_library"
158+
- "-//tests/legacy/examples/cgo:sub"
348159
- "-//tests/legacy/examples/cgo/cc_dependency:version"
349160
- "-//tests/legacy/examples/cgo/cc_dependency:c_version_so"
350-
- "-//tests/legacy/examples/proto/gogo:gogo_test"
351-
- "-//tests/legacy/examples/proto:proto_pure_test"
352-
- "-//tests/legacy/examples/proto:proto_test"
161+
- "-//tests/legacy/examples/cgo/example_command:example_command"
162+
- "-//tests/legacy/examples/cgo/example_command:example_command_script"
163+
- "-//tests/legacy/examples/cgo/example_command:example_command_test"
353164
- "-//tests/legacy/extldflags_rpath:extldflags_rpath_test"
354165
- "-//tests/legacy/info:info"
355166
- "-//tests/legacy/test_chdir:go_default_test"
356167
- "-//tests/legacy/test_rundir:go_default_test"
357168
- "-//tests/legacy/transitive_data:go_default_test"
358-
# Stardoc produces different line-endings on windows,
359-
# so the documentation it generates doesn't match the checked in files.
360-
# - Tracking issue https://github.com/bazelbuild/stardoc/issues/42.
169+
- "-@org_golang_x_crypto//sha3:sha3_test"
170+
- "-@org_golang_x_sys//windows/svc:svc_test"
171+
- "-@org_golang_x_text//language:language_test"
172+
- "-@org_golang_x_tools//cmd/splitdwarf/internal/macho:macho_test"
173+
- "-@test_chdir_remote//sub:go_default_test"
174+
# Plugins aren't supported on Windows.
175+
- "-//tests/core/go_plugin/..."
176+
- "-//tests/core/go_plugin_with_proto_library/..."
177+
# TODO: Update stardoc for consistent line endings.
361178
- "-//docs:all"
362179
# The following configurations test a seperate WORKSPACE under the examples folder
363180
ubuntu2004_examples:

.bazelversion

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.4.1

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ The Go rules are tested and supported on the following host platforms:
282282
Users have reported success on several other platforms, but the rules are
283283
only tested on those listed above.
284284

285-
Note: Since version v0.38.0, rules_go requires Bazel ≥ 5.4.0 to work.
285+
Note: Since version v0.51.0, rules_go requires Bazel ≥ 6.5.0 to work.
286286

287287
The ``master`` branch is only guaranteed to work with the latest version of Bazel.
288288

go/private/common.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def get_versioned_shared_lib_extension(path):
140140
# something like 1.2.3, or so.1.2, or dylib.1.2, or foo.1.2
141141
return ""
142142

143-
MINIMUM_BAZEL_VERSION = "5.4.0"
143+
MINIMUM_BAZEL_VERSION = "6.5.0"
144144

145145
def as_list(v):
146146
"""Returns a list, tuple, or depset as a list."""

tests/bcr/.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.4.0
1+
7.4.1

0 commit comments

Comments
 (0)