Skip to content

Commit 902574b

Browse files
authored
Merge branch 'main' into remove-native-cc-uses
2 parents ba6d80d + a9056b1 commit 902574b

File tree

90 files changed

+1889
-1133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1889
-1133
lines changed

.bazelci/presubmit.yml

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
buildifier:
1717
# keep these arguments in sync with .pre-commit-config.yaml
1818
# Use a specific version to avoid skew issues when new versions are released.
19-
version: 6.1.0
19+
version: 8.2.1
2020
warnings: "all"
2121
# NOTE: Minimum supported version is 7.x
2222
.minimum_supported_version: &minimum_supported_version
@@ -81,11 +81,15 @@ buildifier:
8181
coverage_targets:
8282
- //tests:my_lib_3_10_test
8383
- //tests:my_lib_3_11_test
84-
- //tests:my_lib_3_9_test
84+
- //tests:my_lib_3_12_test
85+
- //tests:my_lib_3_13_test
86+
- //tests:my_lib_3_14_test
8587
- //tests:my_lib_default_test
8688
- //tests:version_3_10_test
8789
- //tests:version_3_11_test
88-
- //tests:version_3_9_test
90+
- //tests:version_3_12_test
91+
- //tests:version_3_13_test
92+
- //tests:version_3_14_test
8993
- //tests:version_default_test
9094
tasks:
9195
gazelle_extension_min:
@@ -155,7 +159,7 @@ tasks:
155159
<<: *reusable_config
156160
<<: *common_workspace_flags
157161
name: "Default: Mac, workspace"
158-
platform: macos
162+
platform: macos_arm64
159163
windows_workspace:
160164
<<: *reusable_config
161165
<<: *common_workspace_flags
@@ -186,10 +190,10 @@ tasks:
186190
<<: *reusable_config
187191
name: "Default: Debian"
188192
platform: debian11
189-
macos:
193+
macos_arm64:
190194
<<: *reusable_config
191195
name: "Default: MacOS"
192-
platform: macos
196+
platform: macos_arm64
193197
windows:
194198
<<: *reusable_config
195199
name: "Default: Windows"
@@ -250,7 +254,7 @@ tasks:
250254
<<: *common_workspace_flags
251255
name: "examples/build_file_generation: macOS, workspace"
252256
working_directory: examples/build_file_generation
253-
platform: macos
257+
platform: macos_arm64
254258
integration_test_build_file_generation_windows_workspace:
255259
<<: *reusable_build_test_all
256260
<<: *common_workspace_flags
@@ -301,14 +305,14 @@ tasks:
301305
<<: *coverage_targets_example_bzlmod
302306
name: "examples/bzlmod: macOS"
303307
working_directory: examples/bzlmod
304-
platform: macos
308+
platform: macos_arm64
305309
bazel: 7.x
306310
integration_test_bzlmod_macos_upcoming:
307311
<<: *reusable_build_test_all
308312
<<: *coverage_targets_example_bzlmod
309313
name: "examples/bzlmod: macOS, upcoming Bazel"
310314
working_directory: examples/bzlmod
311-
platform: macos
315+
platform: macos_arm64
312316
bazel: last_rc
313317
integration_test_bzlmod_windows:
314318
<<: *reusable_build_test_all
@@ -358,7 +362,7 @@ tasks:
358362
<<: *coverage_targets_example_bzlmod_build_file_generation
359363
name: "gazelle/examples/bzlmod_build_file_generation: MacOS"
360364
working_directory: gazelle/examples/bzlmod_build_file_generation
361-
platform: macos
365+
platform: macos_arm64
362366
integration_test_bzlmod_build_file_generation_windows:
363367
<<: *reusable_build_test_all
364368
# coverage is not supported on Windows
@@ -386,7 +390,7 @@ tasks:
386390
<<: *coverage_targets_example_multi_python
387391
name: "examples/multi_python_versions: MacOS, workspace"
388392
working_directory: examples/multi_python_versions
389-
platform: macos
393+
platform: macos_arm64
390394
integration_test_multi_python_versions_windows_workspace:
391395
<<: *reusable_build_test_all
392396
<<: *common_workspace_flags
@@ -423,7 +427,7 @@ tasks:
423427
<<: *reusable_build_test_all
424428
name: "examples/pip_parse: MacOS"
425429
working_directory: examples/pip_parse
426-
platform: macos
430+
platform: macos_arm64
427431
integration_test_pip_parse_windows:
428432
<<: *reusable_build_test_all
429433
name: "examples/pip_parse: Windows"
@@ -454,7 +458,7 @@ tasks:
454458
<<: *common_workspace_flags
455459
name: "examples/pip_parse_vendored: MacOS"
456460
working_directory: examples/pip_parse_vendored
457-
platform: macos
461+
platform: macos_arm64
458462
# We don't run pip_parse_vendored under Windows as the file checked in is
459463
# generated from a repository rule containing OS-specific rendered paths.
460464

@@ -477,7 +481,7 @@ tasks:
477481
<<: *common_workspace_flags
478482
name: "examples/py_proto_library: MacOS, workspace"
479483
working_directory: examples/py_proto_library
480-
platform: macos
484+
platform: macos_arm64
481485
integration_test_py_proto_library_windows_workspace:
482486
<<: *reusable_build_test_all
483487
<<: *common_workspace_flags
@@ -502,7 +506,7 @@ tasks:
502506
<<: *common_workspace_flags
503507
name: "examples/pip_repository_annotations: macOS, workspace"
504508
working_directory: examples/pip_repository_annotations
505-
platform: macos
509+
platform: macos_arm64
506510
integration_test_pip_repository_annotations_windows_workspace:
507511
<<: *reusable_build_test_all
508512
<<: *common_workspace_flags
@@ -524,7 +528,7 @@ tasks:
524528
integration_test_bazelinbazel_macos:
525529
<<: *common_bazelinbazel_config
526530
name: "tests/integration bazel-in-bazel: macOS (subset)"
527-
platform: macos
531+
platform: macos_arm64
528532
build_targets: ["//tests/integration:local_toolchains_test_bazel_self"]
529533
test_targets: ["//tests/integration:local_toolchains_test_bazel_self"]
530534
# The bazelinbazel tests were disabled on Windows to save CI jobs slots, and
@@ -577,7 +581,7 @@ tasks:
577581
<<: *reusable_build_test_all
578582
name: "compile_pip_requirements: MacOS"
579583
working_directory: tests/integration/compile_pip_requirements
580-
platform: macos
584+
platform: macos_arm64
581585
shell_commands:
582586
# Make a change to the locked requirements and then assert that //:requirements.update does the
583587
# right thing.
@@ -610,20 +614,6 @@ tasks:
610614
- "bazel run //:os_specific_requirements.update"
611615
- "git diff --exit-code"
612616

613-
614-
integration_test_ignore_root_user_error_macos_workspace:
615-
<<: *reusable_build_test_all
616-
<<: *common_workspace_flags
617-
name: "ignore_root_user_error: macOS, workspace"
618-
working_directory: tests/integration/ignore_root_user_error
619-
platform: macos
620-
integration_test_ignore_root_user_error_windows_workspace:
621-
<<: *reusable_build_test_all
622-
<<: *common_workspace_flags
623-
name: "ignore_root_user_error: Windows, workspace"
624-
working_directory: tests/integration/ignore_root_user_error
625-
platform: windows
626-
627617
integration_compile_pip_requirements_test_from_external_repo_ubuntu_min_workspace:
628618
<<: *minimum_supported_version
629619
<<: *common_workspace_flags_min_bazel
@@ -659,7 +649,7 @@ tasks:
659649
integration_compile_pip_requirements_test_from_external_repo_macos:
660650
name: "compile_pip_requirements_test_from_external_repo: macOS"
661651
working_directory: tests/integration/compile_pip_requirements_test_from_external_repo
662-
platform: macos
652+
platform: macos_arm64
663653
shell_commands:
664654
# Assert that @compile_pip_requirements//:requirements_test does the right thing.
665655
- "bazel test @compile_pip_requirements//..."

.bazelignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ gazelle/examples/bzlmod_build_file_generation/bazel-bzlmod_build_file_generation
3131
gazelle/examples/bzlmod_build_file_generation/bazel-out
3232
gazelle/examples/bzlmod_build_file_generation/bazel-testlog
3333
tests/integration/compile_pip_requirements/bazel-compile_pip_requirements
34-
tests/integration/ignore_root_user_error/bazel-ignore_root_user_error
3534
tests/integration/local_toolchains/bazel-local_toolchains
3635
tests/integration/py_cc_toolchain_registered/bazel-py_cc_toolchain_registered

.bazelrc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@
22
# Trick bazel into treating BUILD files under examples/* as being regular files
33
# This lets us glob() up all the files inside the examples to make them inputs to tests
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
5-
# To update these lines, execute
6-
# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
7-
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,rules_python-repro,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered,tests/modules/another_module,tests/modules/other,tests/modules/other/nspkg_delta,tests/modules/other/nspkg_gamma,tests/modules/other/nspkg_single,tests/modules/other/simple_v1,tests/modules/other/simple_v2,tests/modules/other/with_external_data,tests/whl_with_build_files/testdata,tests/whl_with_build_files/testdata/somepkg,tests/whl_with_build_files/testdata/somepkg-1.0.dist-info,tests/whl_with_build_files/testdata/somepkg/subpkg
8-
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,rules_python-repro,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered,tests/modules/another_module,tests/modules/other,tests/modules/other/nspkg_delta,tests/modules/other/nspkg_gamma,tests/modules/other/nspkg_single,tests/modules/other/simple_v1,tests/modules/other/simple_v2,tests/modules/other/with_external_data,tests/whl_with_build_files/testdata,tests/whl_with_build_files/testdata/somepkg,tests/whl_with_build_files/testdata/somepkg-1.0.dist-info,tests/whl_with_build_files/testdata/somepkg/subpkg
5+
# To update the file, execute
6+
import %workspace%/.bazelrc.deleted_packages
97

108
test --test_output=errors
119

12-
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation
13-
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation/runfiles
14-
1510
# Do NOT implicitly create empty __init__.py files in the runfiles tree.
1611
# By default, these are created in every directory containing Python source code
1712
# or shared libraries, and every parent directory of those directories,
@@ -30,6 +25,9 @@ build --enable_runfiles
3025
# Make Bazel 7 use bzlmod by default
3126
common --enable_bzlmod
3227

28+
# Local disk cache greatly speeds up builds if the regular cache is lost
29+
common --disk_cache=~/.cache/bazel/bazel-disk-cache
30+
3331
# Additional config to use for readthedocs builds.
3432
# See .readthedocs.yml for additional flags that can only be determined from
3533
# the runtime environment.

.bazelrc.deleted_packages

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Generated via './tools/update_deleted_packages.sh'
2+
common --deleted_packages=examples/build_file_generation
3+
common --deleted_packages=examples/build_file_generation/random_number_generator
4+
common --deleted_packages=examples/bzlmod
5+
common --deleted_packages=examples/bzlmod/entry_points
6+
common --deleted_packages=examples/bzlmod/entry_points/tests
7+
common --deleted_packages=examples/bzlmod/libs/my_lib
8+
common --deleted_packages=examples/bzlmod/other_module
9+
common --deleted_packages=examples/bzlmod/other_module/other_module/pkg
10+
common --deleted_packages=examples/bzlmod/patches
11+
common --deleted_packages=examples/bzlmod/py_proto_library
12+
common --deleted_packages=examples/bzlmod/py_proto_library/example.com/another_proto
13+
common --deleted_packages=examples/bzlmod/py_proto_library/example.com/proto
14+
common --deleted_packages=examples/bzlmod/py_proto_library/foo_external
15+
common --deleted_packages=examples/bzlmod/runfiles
16+
common --deleted_packages=examples/bzlmod/tests
17+
common --deleted_packages=examples/bzlmod/tests/other_module
18+
common --deleted_packages=examples/bzlmod/whl_mods
19+
common --deleted_packages=examples/multi_python_versions/libs/my_lib
20+
common --deleted_packages=examples/multi_python_versions/requirements
21+
common --deleted_packages=examples/multi_python_versions/tests
22+
common --deleted_packages=examples/pip_parse
23+
common --deleted_packages=examples/pip_parse_vendored
24+
common --deleted_packages=examples/pip_repository_annotations
25+
common --deleted_packages=examples/py_proto_library
26+
common --deleted_packages=examples/py_proto_library/example.com/another_proto
27+
common --deleted_packages=examples/py_proto_library/example.com/proto
28+
common --deleted_packages=gazelle
29+
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation
30+
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation/other_module/other_module/pkg
31+
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation/runfiles
32+
common --deleted_packages=gazelle/manifest
33+
common --deleted_packages=gazelle/manifest/generate
34+
common --deleted_packages=gazelle/manifest/hasher
35+
common --deleted_packages=gazelle/manifest/test
36+
common --deleted_packages=gazelle/modules_mapping
37+
common --deleted_packages=gazelle/python
38+
common --deleted_packages=gazelle/pythonconfig
39+
common --deleted_packages=gazelle/python/private
40+
common --deleted_packages=tests/integration/compile_pip_requirements
41+
common --deleted_packages=tests/integration/compile_pip_requirements_test_from_external_repo
42+
common --deleted_packages=tests/integration/custom_commands
43+
common --deleted_packages=tests/integration/local_toolchains
44+
common --deleted_packages=tests/integration/pip_parse
45+
common --deleted_packages=tests/integration/pip_parse/empty
46+
common --deleted_packages=tests/integration/py_cc_toolchain_registered
47+
common --deleted_packages=tests/modules/another_module
48+
common --deleted_packages=tests/modules/other
49+
common --deleted_packages=tests/modules/other/nspkg_delta
50+
common --deleted_packages=tests/modules/other/nspkg_gamma
51+
common --deleted_packages=tests/modules/other/nspkg_single
52+
common --deleted_packages=tests/modules/other/simple_v1
53+
common --deleted_packages=tests/modules/other/simple_v2
54+
common --deleted_packages=tests/modules/other/with_external_data

.bcr/gazelle/presubmit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ bcr_test_module:
1616
module_path: "examples/bzlmod_build_file_generation"
1717
matrix:
1818
platform: ["debian11", "macos", "ubuntu2004", "windows"]
19-
# last_rc is to get latest 8.x release. Replace with 8.x when available.
20-
bazel: [7.x, last_rc]
19+
bazel: [7.x, 8.x]
2120
tasks:
2221
run_tests:
2322
name: "Run test module"
2423
platform: ${{ platform }}
2524
bazel: ${{ bazel }}
2625
shell_commands:
2726
- "echo 'common --override_module=rules_python=' >> .bazelrc"
27+
batch_commands:
28+
- "echo common --override_module=rules_python= >> .bazelrc"
2829
build_targets:
2930
- "//..."
3031
- ":modules_map"

.bcr/presubmit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ bcr_test_module:
1616
module_path: "examples/bzlmod"
1717
matrix:
1818
platform: ["debian11", "macos", "ubuntu2004", "windows"]
19-
# last_rc is to get latest 8.x release. Replace with 8.x when available.
20-
bazel: [7.x, last_rc]
19+
bazel: [7.x, 8.x]
2120
tasks:
2221
run_tests:
2322
name: "Run test module"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: check-merge-conflict
2323
- repo: https://github.com/keith/pre-commit-buildifier
24-
rev: 6.1.0
24+
rev: 8.2.1
2525
hooks:
2626
- id: buildifier
2727
args: &args
@@ -48,6 +48,6 @@ repos:
4848
language: system
4949
# 7.x is necessary until https://github.com/bazel-contrib/rules_bazel_integration_test/pull/414
5050
# is merged and released
51-
entry: env USE_BAZEL_VERSION=7.x bazel run @rules_bazel_integration_test//tools:update_deleted_packages
51+
entry: ./tools/update_deleted_packages.sh
5252
files: ^((examples|tests)/.*/(MODULE.bazel|WORKSPACE|WORKSPACE.bzlmod|BUILD.bazel)|.bazelrc)$
5353
pass_filenames: false

0 commit comments

Comments
 (0)