Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a996fce
simplify the initial port/uniification
aignas Nov 24, 2025
732c425
update rules_go, gazelle and java
aignas Nov 24, 2025
e89a50b
fix the bazelrc
aignas Nov 24, 2025
1e4f22a
update C++
aignas Nov 24, 2025
b39a19b
better job naming
aignas Nov 24, 2025
17a8e55
attempt bazel version in the job title
aignas Nov 24, 2025
4f44c17
Revert "attempt bazel version in the job title"
aignas Nov 24, 2025
b91a618
Only use bazel 7 and 8
aignas Nov 25, 2025
cd86638
revert rules_python to rules_go 41, gazelle 40
rickeylev Nov 25, 2025
b2be8f3
Merge branch 'main' into aignas.chore.bump-for-bazel-9
aignas Nov 26, 2025
972a424
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev Dec 3, 2025
368ced6
Merge branch 'aignas.chore.bump-for-bazel-9' of https://github.com/ai…
rickeylev Dec 3, 2025
5c1330f
set c++17 for build command step
rickeylev Dec 3, 2025
a41d806
use /std for windows
rickeylev Dec 3, 2025
05b8dfe
fix windows flag syntx
rickeylev Dec 3, 2025
759d304
try to fix syntax error in win command
rickeylev Dec 3, 2025
71cdb8b
add leading space to fix syntx error
rickeylev Dec 3, 2025
7403e0b
try to put bazel version in job name
rickeylev Dec 3, 2025
eb5b9e2
revert putting bzel verison in job name
rickeylev Dec 3, 2025
0a98669
try regular format syntax for name
rickeylev Dec 4, 2025
159995b
refine task name
rickeylev Dec 4, 2025
ff6ea32
no gazelle windows
rickeylev Dec 4, 2025
c2d7cb0
fix yaml syntax
rickeylev Dec 4, 2025
a1db98d
add comments, remove windows from bcr presubmit
rickeylev Dec 4, 2025
7a454f0
update changlog
rickeylev Dec 4, 2025
0a11a22
note windows gazelle is broken
rickeylev Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 59 additions & 101 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,63 @@ buildifier:
- //tests:version_3_13_test
- //tests:version_3_14_test
- //tests:version_default_test

# Keep in sync with .bcr/gazelle/presubmit.yml
.gazelle_common_bcr: &gazelle_common_bcr
bazel: ${{ bazel }}
working_directory: gazelle/examples/bzlmod_build_file_generation
shell_commands:
- "echo 'common --override_module=rules_python=' >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
batch_commands:
- "echo common --override_module=rules_python= >> .bazelrc "
- " bazel run //:gazelle_python_manifest.update "
- " bazel run //:gazelle -- update"
build_targets:
- "//..."
- ":modules_map"
test_targets:
- "//..."


matrix:
platform:
- ubuntu2204
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add Ubuntu 2404 too? Or is it not available in our ci?

- debian11
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add debian 12? 13 is already out also.

- macos_arm64
- windows
bazel: [7.*, 8.*]

tasks:
# Keep in sync with .bcr/presubmit.yml
bcr_test:
name: "BCR: Bazel {bazel}"
platform: ${{ platform }}
working_directory: examples/bzlmod
bazel: ${{ bazel }}
build_flags:
- "--keep_going"
test_flags:
- "--keep_going"
build_targets:
- "//..."
test_targets:
- "//..."

gazelle_bcr_ubuntu:
<<: *gazelle_common_bcr
name: "Gazelle: BCR, Bazel {bazel}"
platform: ubuntu2204
gazelle_bcr_debian11:
<<: *gazelle_common_bcr
name: "Gazelle: BCR, Bazel {bazel}"
platform: debian11
gazelle_bcr_macos_arm64:
<<: *gazelle_common_bcr
name: "Gazelle: BCR, Bazel {bazel}"
platform: macos_arm64

gazelle_extension_min:
<<: *common_workspace_flags_min_bazel
<<: *minimum_supported_version
Expand Down Expand Up @@ -262,113 +318,15 @@ tasks:
working_directory: examples/build_file_generation
platform: windows

integration_test_bzlmod_ubuntu_min:
<<: *minimum_supported_version
<<: *reusable_build_test_all
coverage_targets: ["//:test"]
name: "examples/bzlmod: Ubuntu, minimum Bazel"
working_directory: examples/bzlmod
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_ubuntu:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: Ubuntu"
working_directory: examples/bzlmod
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_ubuntu_upcoming:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: Ubuntu, upcoming Bazel"
working_directory: examples/bzlmod
platform: ubuntu2204
bazel: last_rc
integration_test_bzlmod_debian:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: Debian"
working_directory: examples/bzlmod
platform: debian11
bazel: 7.x
integration_test_bzlmod_ubuntu_vendor:
<<: *reusable_build_test_all
name: "examples/bzlmod: bazel vendor"
working_directory: examples/bzlmod
platform: ubuntu2204
shell_commands:
- "bazel vendor --vendor_dir=./vendor //..."
- "bazel build --vendor_dir=./vendor //..."
- "rm -rf ./vendor"
integration_test_bzlmod_macos:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: macOS"
working_directory: examples/bzlmod
platform: macos_arm64
bazel: 7.x
integration_test_bzlmod_macos_upcoming:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod
name: "examples/bzlmod: macOS, upcoming Bazel"
working_directory: examples/bzlmod
platform: macos_arm64
bazel: last_rc
integration_test_bzlmod_windows:
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "examples/bzlmod: Windows"
working_directory: examples/bzlmod
platform: windows
bazel: 7.x
integration_test_bzlmod_windows_upcoming:
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "examples/bzlmod: Windows, upcoming Bazel"
working_directory: examples/bzlmod
platform: windows
bazel: last_rc

integration_test_bzlmod_generate_build_file_generation_ubuntu_min:
<<: *minimum_supported_version
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, minimum Bazel"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
bazel: 7.x
integration_test_bzlmod_generation_build_files_ubuntu:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
integration_test_bzlmod_generation_build_files_ubuntu_run:
<<: *reusable_build_test_all
name: "gazelle/examples/bzlmod_build_file_generation: Ubuntu, Gazelle and pip"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: ubuntu2204
shell_commands:
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
integration_test_bzlmod_build_file_generation_debian:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: Debian"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: debian11
integration_test_bzlmod_build_file_generation_macos:
<<: *reusable_build_test_all
<<: *coverage_targets_example_bzlmod_build_file_generation
name: "gazelle/examples/bzlmod_build_file_generation: MacOS"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: macos_arm64
integration_test_bzlmod_build_file_generation_windows:
<<: *reusable_build_test_all
# coverage is not supported on Windows
name: "gazelle/examples/bzlmod_build_file_generation: Windows"
working_directory: gazelle/examples/bzlmod_build_file_generation
platform: windows
- "bazel vendor --vendor_dir=./vendor //..."
- "bazel build --vendor_dir=./vendor //..."
- "rm -rf ./vendor"

integration_test_multi_python_versions_ubuntu_workspace:
<<: *reusable_build_test_all
Expand Down
15 changes: 13 additions & 2 deletions .bcr/gazelle/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,28 @@
bcr_test_module:
module_path: "examples/bzlmod_build_file_generation"
matrix:
platform: ["debian11", "macos", "ubuntu2004", "windows"]
bazel: [7.x, 8.x]
platform: [
"debian11",
"macos",
"ubuntu2204",
]
bazel: [
7.*,
8.*,
]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
shell_commands:
- "echo 'common --override_module=rules_python=' >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
batch_commands:
- "echo common --override_module=rules_python= >> .bazelrc"
- "bazel run //:gazelle_python_manifest.update"
- "bazel run //:gazelle -- update"
build_targets:
- "//..."
- ":modules_map"
Expand Down
12 changes: 7 additions & 5 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
bcr_test_module:
module_path: "examples/bzlmod"
matrix:
platform: ["debian11", "macos", "ubuntu2004", "windows"]
bazel: [7.x, 8.x]
platform: ["debian11", "macos", "ubuntu2204", "windows"]
bazel: [7.*, 8.*]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_flags:
# Minimum bazel supported C++
- "--keep_going"
# Without these cxxopts, BCR's Mac builds fail
- '--cxxopt=-std=c++14'
- '--host_cxxopt=-std=c++14'
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- "//..."
test_targets:
- "//..."
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ END_UNRELEASED_TEMPLATE

[0.0.0]: https://github.com/bazel-contrib/rules_python/releases/tag/0.0.0

{#v0-0-0-known-issues}
### Known Issues
* (gazelle) Windows support for the Gazelle plugin may be broken. See
[#3416](https://github.com/bazel-contrib/rules_python/issues/3416) for
details and possible workarounds.

{#v0-0-0-removed}
### Removed
* (toolchain) Remove all of the python 3.8 toolchain support out of the box. Users need
Expand All @@ -75,6 +81,8 @@ END_UNRELEASED_TEMPLATE
* (pip) `pipstar` has been enabled for all `whl_library` instances where the whl
is passed through a label or downloaded using the bazel downloader
([#2949](https://github.com/bazel-contrib/rules_python/issues/2949)).
* (gazelle deps) rules_go bumped from 0.55.1 to 0.59.0
* (gazelle deps) gazelle bumped from 0.36.0 to 0.47.0

{#v0-0-0-fixed}
### Fixed
Expand Down
11 changes: 11 additions & 0 deletions examples/bzlmod/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ startup --windows_enable_symlinks

common --enable_bzlmod
common --lockfile_mode=update
# This adds an implicit --config=<osname>
# See docs for osname values
# https://bazel.build/reference/command-line-reference#common_options-flag--enable_platform_specific_config
common --enable_platform_specific_config

common:windows --cxxopt=/std:c++17
common:windows --host_cxxopt=/std:c++17
common:linux --cxxopt=-std=c++17
common:linux --host_cxxopt=-std=c++17
common:macos --cxxopt=-std=c++17
common:macos --host_cxxopt=-std=c++17

coverage --java_runtime_version=remotejdk_11

Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bazel_dep(name = "protobuf", version = "27.0", repo_name = "com_google_protobuf"

# Only needed to make rules_python's CI happy. rules_java 8.3.0+ is needed so
# that --java_runtime_version=remotejdk_11 works with Bazel 8.
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")

# Only needed to make rules_python's CI happy. A test verifies that
# MODULE.bazel.lock is cross-platform friendly, and there are transitive
Expand Down
2 changes: 1 addition & 1 deletion examples/multi_python_versions/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True)

# Only needed to make rules_python's CI happy. rules_java 8.3.0+ is needed so
# that --java_runtime_version=remotejdk_11 works with Bazel 8.
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")
4 changes: 2 additions & 2 deletions gazelle/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module(

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "rules_python", version = "0.18.0")
bazel_dep(name = "rules_go", version = "0.55.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_cc", version = "0.0.16")

local_path_override(
Expand Down
2 changes: 1 addition & 1 deletion gazelle/examples/bzlmod_build_file_generation/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ test --test_output=errors --enable_runfiles
# Windows requires these for multi-python support:
build --enable_runfiles

common --experimental_enable_bzlmod
common --enable_bzlmod

coverage --java_runtime_version=remotejdk_11
common:bazel7.x --incompatible_python_disallow_native_rules
Expand Down
4 changes: 2 additions & 2 deletions gazelle/examples/bzlmod_build_file_generation/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local_path_override(
# The following stanza defines the dependency for gazelle
# See here https://github.com/bazelbuild/bazel-gazelle/releases/ for the
# latest version.
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")

# The following stanze returns a proxy object representing a module extension;
# its methods can be invoked to create module extension tags.
Expand Down Expand Up @@ -84,4 +84,4 @@ local_path_override(
)

# Only needed to make rules_python's CI happy
bazel_dep(name = "rules_java", version = "8.3.1")
bazel_dep(name = "rules_java", version = "8.16.1")