From 0c0509578f01b460abee10ec453bae44cf2b6a7f Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 10 Nov 2025 23:44:57 +0900 Subject: [PATCH 01/24] add ci config to test 7, 8 and 9 for bcr like setup --- .bazelci/presubmit.yml | 158 +++++++++++++---------------------------- 1 file changed, 50 insertions(+), 108 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 1cb3a01365..09d38f3146 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -87,7 +87,57 @@ buildifier: - //tests:version_3_11_test - //tests:version_3_9_test - //tests:version_default_test + +matrix: + platform: + - ubuntu2204 + - macos + - windows + bazel: [7.*, 8.*, 9.*] + bcr_variant: + - examples/bzlmod + - gazelle/examples/bzlmod_build_file_generation tasks: + # Keep in sync with .bcr/presubmit.yml + bcr_tests: + name: BCR test module + platform: ${{ platform }} + bazel: ${{ bazel }} + working_directory: ${{ bcr_variant }} + platform: ${{ platform }} + bazel: ${{ bazel }} + shell_commands: + - "bazel vendor --vendor_dir=./vendor //..." + - "bazel build --vendor_dir=./vendor //..." + - "rm -rf ./vendor" + coverage_targets: ["//:test"] + test_flags: + - "--keep_going" + # Without these cxxopts, BCR's Mac builds fail + - '--cxxopt=-std=c++14' + - '--host_cxxopt=-std=c++14' + test_targets: + - "//..." + bcr_gazelle_tests: + # Keep in sync with .bcr/gazelle/presubmit.yml + name: BCR gazelle test module + platform: ${{ platform }} + bazel: ${{ bazel }} + working_directory: ${{ bcr_variant }} + # Regenerate the BUILD files for the test module using Gazelle. + # Also verify -repo_config are generated correctly in gazelle.bash + shell_commands: + - "echo 'common --override_module=rules_python=' >> .bazelrc" + - bazel run //:gazelle + batch_commands: + - "echo common --override_module=rules_python= >> .bazelrc" + - bazel run //:gazelle + build_targets: + - "//..." + - ":modules_map" + test_targets: + - "//..." + gazelle_extension_min: <<: *common_workspace_flags_min_bazel <<: *minimum_supported_version @@ -258,114 +308,6 @@ 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 - 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 - 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 - 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 - integration_test_multi_python_versions_ubuntu_workspace: <<: *reusable_build_test_all <<: *common_workspace_flags From 7080341dbb823ecb91137fe4f65c62796fa94c34 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Mon, 10 Nov 2025 23:58:50 +0900 Subject: [PATCH 02/24] bump gazelle and rules_go for bazel 9 compatibility --- MODULE.bazel | 2 +- gazelle/MODULE.bazel | 4 ++-- gazelle/examples/bzlmod_build_file_generation/.bazelrc | 2 +- .../examples/bzlmod_build_file_generation/MODULE.bazel | 4 ++-- gazelle/go.mod | 10 ++++++---- gazelle/go.sum | 6 ++++++ 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 6e9b725c53..7162911398 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -226,7 +226,7 @@ bazel_dep(name = "another_module", version = "0", dev_dependency = True) # Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests. # We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides. -bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go") +bazel_dep(name = "rules_go", version = "0.59.0", dev_dependency = True, repo_name = "io_bazel_rules_go") bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True) bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle") diff --git a/gazelle/MODULE.bazel b/gazelle/MODULE.bazel index add5986903..cff6341a2b 100644 --- a/gazelle/MODULE.bazel +++ b/gazelle/MODULE.bazel @@ -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( diff --git a/gazelle/examples/bzlmod_build_file_generation/.bazelrc b/gazelle/examples/bzlmod_build_file_generation/.bazelrc index d58665596b..31097b41de 100644 --- a/gazelle/examples/bzlmod_build_file_generation/.bazelrc +++ b/gazelle/examples/bzlmod_build_file_generation/.bazelrc @@ -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 diff --git a/gazelle/examples/bzlmod_build_file_generation/MODULE.bazel b/gazelle/examples/bzlmod_build_file_generation/MODULE.bazel index ce779627f5..1f92ea3826 100644 --- a/gazelle/examples/bzlmod_build_file_generation/MODULE.bazel +++ b/gazelle/examples/bzlmod_build_file_generation/MODULE.bazel @@ -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. @@ -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") diff --git a/gazelle/go.mod b/gazelle/go.mod index 7623079af9..4d27ed3fbd 100644 --- a/gazelle/go.mod +++ b/gazelle/go.mod @@ -1,12 +1,14 @@ module github.com/bazel-contrib/rules_python/gazelle -go 1.21.13 +go 1.22.9 + +toolchain go1.23.6 require ( - github.com/bazelbuild/bazel-gazelle v0.36.0 - github.com/bazelbuild/buildtools v0.0.0-20240313121412-66c605173954 + github.com/bazelbuild/bazel-gazelle v0.47.0 + github.com/bazelbuild/buildtools v0.0.0-20250930140053-2eb4fccefb52 github.com/bazelbuild/rules_go v0.55.1 - github.com/bmatcuk/doublestar/v4 v4.7.1 + github.com/bmatcuk/doublestar/v4 v4.9.1 github.com/emirpasic/gods v1.18.1 github.com/ghodss/yaml v1.0.0 github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 diff --git a/gazelle/go.sum b/gazelle/go.sum index 5a4d42d46a..2bda8af105 100644 --- a/gazelle/go.sum +++ b/gazelle/go.sum @@ -2,12 +2,18 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/bazelbuild/bazel-gazelle v0.36.0 h1:n41ODckCkU9D2BEwBxYN+xu5E92Vd0gaW6QmsIW9l00= github.com/bazelbuild/bazel-gazelle v0.36.0/go.mod h1:5wGHbkRpDUdz4LxREtPYwXstrWfnkV+oDmOuxNAxW1s= +github.com/bazelbuild/bazel-gazelle v0.47.0 h1:g3Rr1ZbkC1Pk20aOgBITxSD/efS1WbaSty5jC786Z3Q= +github.com/bazelbuild/bazel-gazelle v0.47.0/go.mod h1:8Ozf20jhv+in87nCUHdmUPPcVGTfKg/gotZ/hce3T+w= github.com/bazelbuild/buildtools v0.0.0-20240313121412-66c605173954 h1:VNqmvOfFzn2Hrtoni8vqgXlIQ4C2Zt22fxeZ9gOOkp0= github.com/bazelbuild/buildtools v0.0.0-20240313121412-66c605173954/go.mod h1:689QdV3hBP7Vo9dJMmzhoYIyo/9iMhEmHkJcnaPRCbo= +github.com/bazelbuild/buildtools v0.0.0-20250930140053-2eb4fccefb52 h1:njQAmjTv/YHRm/0Lfv9DXHFZ4MdT2IA/RKHTnqZkgDw= +github.com/bazelbuild/buildtools v0.0.0-20250930140053-2eb4fccefb52/go.mod h1:PLNUetjLa77TCCziPsz0EI8a6CUxgC+1jgmWv0H25tg= github.com/bazelbuild/rules_go v0.55.1 h1:cQYGcunY8myOB+0Ym6PGQRhc/milkRcNv0my3XgxaDU= github.com/bazelbuild/rules_go v0.55.1/go.mod h1:T90Gpyq4HDFlsrvtQa2CBdHNJ2P4rAu/uUTmQbanzf0= github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q= github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmatcuk/doublestar/v4 v4.9.1 h1:X8jg9rRZmJd4yRy7ZeNDRnM+T3ZfHv15JiBJ/avrEXE= +github.com/bmatcuk/doublestar/v4 v4.9.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= From f2b68763095cc40c60ecb34ac5ab317625ee6841 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Tue, 11 Nov 2025 00:00:44 +0900 Subject: [PATCH 03/24] fix the matrix --- .bazelci/presubmit.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 09d38f3146..eba03f394c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -94,16 +94,13 @@ matrix: - macos - windows bazel: [7.*, 8.*, 9.*] - bcr_variant: - - examples/bzlmod - - gazelle/examples/bzlmod_build_file_generation tasks: # Keep in sync with .bcr/presubmit.yml bcr_tests: name: BCR test module platform: ${{ platform }} bazel: ${{ bazel }} - working_directory: ${{ bcr_variant }} + working_directory: examples/bzlmod platform: ${{ platform }} bazel: ${{ bazel }} shell_commands: @@ -123,7 +120,7 @@ tasks: name: BCR gazelle test module platform: ${{ platform }} bazel: ${{ bazel }} - working_directory: ${{ bcr_variant }} + working_directory: gazelle/examples/bzlmod_build_file_generation # Regenerate the BUILD files for the test module using Gazelle. # Also verify -repo_config are generated correctly in gazelle.bash shell_commands: From 6bd179c059f7a493f34a67163774812f7924b7c0 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:10:00 -0800 Subject: [PATCH 04/24] reduce to just windows bazel 8 --- .bazelci/presubmit.yml | 508 +---------------------------------------- 1 file changed, 6 insertions(+), 502 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index eba03f394c..0f0573062c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -90,10 +90,8 @@ buildifier: matrix: platform: - - ubuntu2204 - - macos - windows - bazel: [7.*, 8.*, 9.*] + bazel: [8.*] tasks: # Keep in sync with .bcr/presubmit.yml bcr_tests: @@ -103,509 +101,15 @@ tasks: working_directory: examples/bzlmod platform: ${{ platform }} bazel: ${{ bazel }} - shell_commands: - - "bazel vendor --vendor_dir=./vendor //..." - - "bazel build --vendor_dir=./vendor //..." - - "rm -rf ./vendor" - coverage_targets: ["//:test"] + ##shell_commands: + ## - "bazel vendor --vendor_dir=./vendor //..." + ## - "bazel build --vendor_dir=./vendor //..." + ## - "rm -rf ./vendor" + ##coverage_targets: ["//:test"] test_flags: - "--keep_going" # Without these cxxopts, BCR's Mac builds fail - '--cxxopt=-std=c++14' - '--host_cxxopt=-std=c++14' test_targets: - - "//..." - bcr_gazelle_tests: - # Keep in sync with .bcr/gazelle/presubmit.yml - name: BCR gazelle test module - platform: ${{ platform }} - bazel: ${{ bazel }} - working_directory: gazelle/examples/bzlmod_build_file_generation - # Regenerate the BUILD files for the test module using Gazelle. - # Also verify -repo_config are generated correctly in gazelle.bash - shell_commands: - - "echo 'common --override_module=rules_python=' >> .bazelrc" - - bazel run //:gazelle - batch_commands: - - "echo common --override_module=rules_python= >> .bazelrc" - - bazel run //:gazelle - build_targets: - - "//..." - - ":modules_map" - test_targets: - - "//..." - - gazelle_extension_min: - <<: *common_workspace_flags_min_bazel - <<: *minimum_supported_version - name: "Gazelle: workspace, minimum supported Bazel version" - platform: ubuntu2204 - build_targets: ["//..."] - test_targets: ["//..."] - working_directory: gazelle - gazelle_extension_workspace: - <<: *common_workspace_flags - name: "Gazelle: workspace" - platform: ubuntu2204 - build_targets: ["//..."] - test_targets: ["//..."] - working_directory: gazelle - gazelle_extension: - name: "Gazelle: default settings" - platform: ubuntu2204 - build_targets: ["//..."] - test_targets: ["//..."] - working_directory: gazelle - - ubuntu_min_workspace: - <<: *minimum_supported_version - <<: *reusable_config - <<: *common_workspace_flags_min_bazel - name: "Default: Ubuntu, workspace, minimum Bazel" - platform: ubuntu2204 - - ubuntu_min_bzlmod: - <<: *minimum_supported_version - <<: *reusable_config - name: "Default: Ubuntu, bzlmod, minimum Bazel" - platform: ubuntu2204 - bazel: 7.x - ubuntu: - <<: *reusable_config - name: "Default: Ubuntu" - platform: ubuntu2204 - ubuntu_upcoming: - <<: *reusable_config - name: "Default: Ubuntu, upcoming Bazel" - platform: ubuntu2204 - bazel: last_rc - ubuntu_rolling: - name: "Default: Ubuntu, rolling Bazel" - platform: ubuntu2204 - bazel: rolling - # This is an advisory job; doesn't block merges - soft_fail: - - exit_status: 1 - - exit_status: 3 - test_targets: - - "--" - "//tests/..." - test_flags: - - "--keep_going" - - "--test_tag_filters=-integration-test" - ubuntu_workspace: - <<: *reusable_config - <<: *common_workspace_flags - name: "Default: Ubuntu, workspace" - platform: ubuntu2204 - mac_workspace: - <<: *reusable_config - <<: *common_workspace_flags - name: "Default: Mac, workspace" - platform: macos - windows_workspace: - <<: *reusable_config - <<: *common_workspace_flags - name: "Default: Windows, workspace" - platform: windows - # Most of tests/integration are failing on Windows w/workspace. Skip them - # for now until we can look into it. - build_targets: - - "--" - - "..." - # As a regression test for #225, check that wheel targets still build when - # their package path is qualified with the repo name. - - "@rules_python//examples/wheel/..." - build_flags: - - "--noenable_bzlmod" - - "--enable_workspace" - - "--keep_going" - - "--build_tag_filters=-integration-test" - test_targets: - - "--" - - "..." - test_flags: - - "--noenable_bzlmod" - - "--enable_workspace" - - "--test_tag_filters=-integration-test" - - debian: - <<: *reusable_config - name: "Default: Debian" - platform: debian11 - macos: - <<: *reusable_config - name: "Default: MacOS" - platform: macos - windows: - <<: *reusable_config - name: "Default: Windows" - platform: windows - test_flags: - - "--test_tag_filters=-integration-test,-fix-windows" - rbe_min: - <<: *minimum_supported_version - <<: *reusable_config - name: "RBE: Ubuntu, minimum Bazel" - platform: rbe_ubuntu2204 - build_flags: - # BazelCI sets --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1, - # which prevents cc toolchain autodetection from working correctly - # on Bazel 5.4 and earlier. To workaround this, manually specify the - # build kite cc toolchain. - - "--extra_toolchains=@buildkite_config//config:cc-toolchain" - - "--build_tag_filters=-docs" - test_flags: - - "--test_tag_filters=-integration-test,-acceptance-test,-docs" - # BazelCI sets --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1, - # which prevents cc toolchain autodetection from working correctly - # on Bazel 5.4 and earlier. To workaround this, manually specify the - # build kite cc toolchain. - - "--extra_toolchains=@buildkite_config//config:cc-toolchain" - rbe: - <<: *reusable_config - name: "RBE: Ubuntu" - platform: rbe_ubuntu2204 - # TODO @aignas 2024-12-11: get the RBE working in CI for bazel 8.0 - # See https://github.com/bazelbuild/rules_python/issues/2499 - bazel: 7.x - test_flags: - - "--test_tag_filters=-integration-test,-acceptance-test" - - "--extra_toolchains=@buildkite_config//config:cc-toolchain" - - integration_test_build_file_generation_ubuntu_minimum_supported_workspace: - <<: *minimum_supported_version - <<: *reusable_build_test_all - <<: *common_workspace_flags_min_bazel - name: "examples/build_file_generation: Ubuntu, workspace, minimum Bazel" - working_directory: examples/build_file_generation - platform: ubuntu2204 - integration_test_build_file_generation_ubuntu_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/build_file_generation: Ubuntu, workspace" - working_directory: examples/build_file_generation - platform: ubuntu2204 - integration_test_build_file_generation_debian_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/build_file_generation: Debian, workspace" - working_directory: examples/build_file_generation - platform: debian11 - integration_test_build_file_generation_macos_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/build_file_generation: macOS, workspace" - working_directory: examples/build_file_generation - platform: macos - integration_test_build_file_generation_windows_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/build_file_generation: Windows, workspace" - working_directory: examples/build_file_generation - platform: windows - - integration_test_multi_python_versions_ubuntu_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - <<: *coverage_targets_example_multi_python - name: "examples/multi_python_versions: Ubuntu, workspace" - working_directory: examples/multi_python_versions - platform: ubuntu2204 - integration_test_multi_python_versions_debian_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - <<: *coverage_targets_example_multi_python - name: "examples/multi_python_versions: Debian, workspace" - working_directory: examples/multi_python_versions - platform: debian11 - integration_test_multi_python_versions_macos_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - <<: *coverage_targets_example_multi_python - name: "examples/multi_python_versions: MacOS, workspace" - working_directory: examples/multi_python_versions - platform: macos - integration_test_multi_python_versions_windows_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - # coverage is not supported on Windows - name: "examples/multi_python_versions: Windows, workspace" - working_directory: examples/multi_python_versions - platform: windows - - integration_test_pip_parse_ubuntu_min_workspace: - <<: *minimum_supported_version - <<: *common_workspace_flags_min_bazel - <<: *reusable_build_test_all - name: "examples/pip_parse: Ubuntu, workspace, minimum supported Bazel version" - working_directory: examples/pip_parse - platform: ubuntu2204 - integration_test_pip_parse_ubuntu_min_bzlmod: - <<: *minimum_supported_version - <<: *reusable_build_test_all - name: "examples/pip_parse: Ubuntu, bzlmod, minimum supported Bazel version" - working_directory: examples/pip_parse - platform: ubuntu2204 - bazel: 7.x - integration_test_pip_parse_ubuntu: - <<: *reusable_build_test_all - name: "examples/pip_parse: Ubuntu" - working_directory: examples/pip_parse - platform: ubuntu2204 - integration_test_pip_parse_debian: - <<: *reusable_build_test_all - name: "examples/pip_parse: Debian" - working_directory: examples/pip_parse - platform: debian11 - integration_test_pip_parse_macos: - <<: *reusable_build_test_all - name: "examples/pip_parse: MacOS" - working_directory: examples/pip_parse - platform: macos - integration_test_pip_parse_windows: - <<: *reusable_build_test_all - name: "examples/pip_parse: Windows" - working_directory: examples/pip_parse - platform: windows - - integration_test_pip_parse_vendored_ubuntu_min_workspace: - <<: *minimum_supported_version - <<: *common_workspace_flags_min_bazel - <<: *reusable_build_test_all - name: "examples/pip_parse_vendored: Ubuntu, workspace, minimum Bazel" - working_directory: examples/pip_parse_vendored - platform: ubuntu2204 - integration_test_pip_parse_vendored_ubuntu: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_parse_vendored: Ubuntu" - working_directory: examples/pip_parse_vendored - platform: ubuntu2204 - integration_test_pip_parse_vendored_debian: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_parse_vendored: Debian" - working_directory: examples/pip_parse_vendored - platform: debian11 - integration_test_pip_parse_vendored_macos: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_parse_vendored: MacOS" - working_directory: examples/pip_parse_vendored - platform: macos - # We don't run pip_parse_vendored under Windows as the file checked in is - # generated from a repository rule containing OS-specific rendered paths. - - # The proto example is workspace-only; bzlmod functionality is covered - # by examples/bzlmod/py_proto_library - integration_test_py_proto_library_ubuntu_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/py_proto_library: Ubuntu, workspace" - working_directory: examples/py_proto_library - platform: ubuntu2204 - integration_test_py_proto_library_debian_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/py_proto_library: Debian, workspace" - working_directory: examples/py_proto_library - platform: debian11 - integration_test_py_proto_library_macos_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/py_proto_library: MacOS, workspace" - working_directory: examples/py_proto_library - platform: macos - integration_test_py_proto_library_windows_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/py_proto_library: Windows, workspace" - working_directory: examples/py_proto_library - platform: windows - - integration_test_pip_repository_annotations_ubuntu_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_repository_annotations: Ubuntu, workspace" - working_directory: examples/pip_repository_annotations - platform: ubuntu2204 - integration_test_pip_repository_annotations_debian_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_repository_annotations: Debian, workspace" - working_directory: examples/pip_repository_annotations - platform: debian11 - integration_test_pip_repository_annotations_macos_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_repository_annotations: macOS, workspace" - working_directory: examples/pip_repository_annotations - platform: macos - integration_test_pip_repository_annotations_windows_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "examples/pip_repository_annotations: Windows, workspace" - working_directory: examples/pip_repository_annotations - platform: windows - - integration_test_bazelinbazel_ubuntu: - <<: *common_bazelinbazel_config - name: "tests/integration bazel-in-bazel: Ubuntu" - platform: ubuntu2204 - integration_test_bazelinbazel_debian: - <<: *common_bazelinbazel_config - name: "tests/integration bazel-in-bazel: Debian" - platform: debian11 - # The bazelinbazel tests were disabled on Mac to save CI jobs slots, and - # have bitrotted a bit. For now, just run a subset of what we're most - # interested in. - integration_test_bazelinbazel_macos: - <<: *common_bazelinbazel_config - name: "tests/integration bazel-in-bazel: macOS (subset)" - platform: macos - build_targets: ["//tests/integration:local_toolchains_test_bazel_self"] - test_targets: ["//tests/integration:local_toolchains_test_bazel_self"] - # The bazelinbazel tests were disabled on Windows to save CI jobs slots, and - # have bitrotted a bit. For now, just run a subset of what we're most - # interested in. - integration_test_bazelinbazel_windows: - <<: *common_bazelinbazel_config - name: "tests/integration bazel-in-bazel: Windows (subset)" - platform: windows - build_targets: ["//tests/integration:local_toolchains_test_bazel_self"] - test_targets: ["//tests/integration:local_toolchains_test_bazel_self"] - - integration_test_compile_pip_requirements_ubuntu: - <<: *reusable_build_test_all - name: "compile_pip_requirements: Ubuntu" - working_directory: tests/integration/compile_pip_requirements - platform: ubuntu2204 - shell_commands: - # Make a change to the locked requirements and then assert that //:requirements.update does the - # right thing. - - "echo '' > requirements_lock.txt" - - "! git diff --exit-code" - - "bazel run //:requirements.update" - - "git diff --exit-code" - # Make a change to the locked requirements and then assert that //:os_specific_requirements.update does the - # right thing. - - "echo '' > requirements_lock_linux.txt" - - "! git diff --exit-code" - - "bazel run //:os_specific_requirements.update" - - "git diff --exit-code" - integration_test_compile_pip_requirements_debian: - <<: *reusable_build_test_all - name: "compile_pip_requirements: Debian" - working_directory: tests/integration/compile_pip_requirements - platform: debian11 - shell_commands: - # Make a change to the locked requirements and then assert that //:requirements.update does the - # right thing. - - "echo '' > requirements_lock.txt" - - "! git diff --exit-code" - - "bazel run //:requirements.update" - - "git diff --exit-code" - # Make a change to the locked requirements and then assert that //:os_specific_requirements.update does the - # right thing. - - "echo '' > requirements_lock_linux.txt" - - "! git diff --exit-code" - - "bazel run //:os_specific_requirements.update" - - "git diff --exit-code" - integration_test_compile_pip_requirements_macos: - <<: *reusable_build_test_all - name: "compile_pip_requirements: MacOS" - working_directory: tests/integration/compile_pip_requirements - platform: macos - shell_commands: - # Make a change to the locked requirements and then assert that //:requirements.update does the - # right thing. - - "echo '' > requirements_lock.txt" - - "! git diff --exit-code" - - "bazel run //:requirements.update" - - "git diff --exit-code" - # Make a change to the locked requirements and then assert that //:os_specific_requirements.update does the - # right thing. - - "echo '' > requirements_lock_darwin.txt" - - "! git diff --exit-code" - - "bazel run //:os_specific_requirements.update" - - "git diff --exit-code" - integration_test_compile_pip_requirements_windows: - <<: *reusable_build_test_all - name: "compile_pip_requirements: Windows" - working_directory: tests/integration/compile_pip_requirements - platform: windows - shell_commands: - # Make a change to the locked requirements and then assert that //:requirements.update does the - # right thing. - - "echo '' > requirements_lock.txt" - - "! git diff --exit-code" - - "bazel run //:requirements.update" - - "git diff --exit-code" - # Make a change to the locked requirements and then assert that //:os_specific_requirements.update does the - # right thing. - - "echo '' > requirements_lock_windows.txt" - - "! git diff --exit-code" - - "bazel run //:os_specific_requirements.update" - - "git diff --exit-code" - - - integration_test_ignore_root_user_error_macos_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "ignore_root_user_error: macOS, workspace" - working_directory: tests/integration/ignore_root_user_error - platform: macos - integration_test_ignore_root_user_error_windows_workspace: - <<: *reusable_build_test_all - <<: *common_workspace_flags - name: "ignore_root_user_error: Windows, workspace" - working_directory: tests/integration/ignore_root_user_error - platform: windows - - integration_compile_pip_requirements_test_from_external_repo_ubuntu_min_workspace: - <<: *minimum_supported_version - <<: *common_workspace_flags_min_bazel - name: "compile_pip_requirements_test_from_external_repo: Ubuntu, workspace, minimum Bazel" - working_directory: tests/integration/compile_pip_requirements_test_from_external_repo - platform: ubuntu2204 - shell_commands: - # Assert that @compile_pip_requirements//:requirements_test does the right thing. - - "bazel test @compile_pip_requirements//..." - integration_compile_pip_requirements_test_from_external_repo_ubuntu_min_bzlmod: - <<: *minimum_supported_version - name: "compile_pip_requirements_test_from_external_repo: Ubuntu, bzlmod, minimum Bazel" - working_directory: tests/integration/compile_pip_requirements_test_from_external_repo - platform: ubuntu2204 - bazel: 7.x - shell_commands: - # Assert that @compile_pip_requirements//:requirements_test does the right thing. - - "bazel test @compile_pip_requirements//..." - integration_compile_pip_requirements_test_from_external_repo_ubuntu: - name: "compile_pip_requirements_test_from_external_repo: Ubuntu" - working_directory: tests/integration/compile_pip_requirements_test_from_external_repo - platform: ubuntu2204 - shell_commands: - # Assert that @compile_pip_requirements//:requirements_test does the right thing. - - "bazel test @compile_pip_requirements//..." - integration_compile_pip_requirements_test_from_external_repo_debian: - name: "compile_pip_requirements_test_from_external_repo: Debian" - working_directory: tests/integration/compile_pip_requirements_test_from_external_repo - platform: debian11 - shell_commands: - # Assert that @compile_pip_requirements//:requirements_test does the right thing. - - "bazel test @compile_pip_requirements//..." - integration_compile_pip_requirements_test_from_external_repo_macos: - name: "compile_pip_requirements_test_from_external_repo: macOS" - working_directory: tests/integration/compile_pip_requirements_test_from_external_repo - platform: macos - shell_commands: - # Assert that @compile_pip_requirements//:requirements_test does the right thing. - - "bazel test @compile_pip_requirements//..." - integration_compile_pip_requirements_test_from_external_repo_windows: - name: "compile_pip_requirements_test_from_external_repo: Windows" - working_directory: tests/integration/compile_pip_requirements_test_from_external_repo - platform: windows - shell_commands: - # Assert that @compile_pip_requirements//:requirements_test does the right thing. - - "bazel test @compile_pip_requirements//..." From b4e3d105aafd7de920ae17eed48d0cdb0777b0cc Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:12:38 -0800 Subject: [PATCH 05/24] add bazel7 for comparison, set -x --- .bazelci/presubmit.yml | 2 +- examples/bzlmod/tests/version_test.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 0f0573062c..e27b5e06f2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -91,7 +91,7 @@ buildifier: matrix: platform: - windows - bazel: [8.*] + bazel: [7.*, 8.*] tasks: # Keep in sync with .bcr/presubmit.yml bcr_tests: diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 3f5fd960cb..51312502de 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -15,6 +15,7 @@ set -o errexit -o nounset -o pipefail +set -x # VERSION_PY_BINARY is a space separate list of the executable and its main # py file. We just want the executable. From 001528e04952dbead6eae240c1319c87f9c0d06a Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:15:40 -0800 Subject: [PATCH 06/24] add bazel version to name, ls -l --- .bazelci/presubmit.yml | 2 +- examples/bzlmod/tests/version_test.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index e27b5e06f2..611d6133a5 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -95,7 +95,7 @@ matrix: tasks: # Keep in sync with .bcr/presubmit.yml bcr_tests: - name: BCR test module + name: BCR test module ${{ bazel }} platform: ${{ platform }} bazel: ${{ bazel }} working_directory: examples/bzlmod diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 51312502de..4ed7af1549 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -21,6 +21,9 @@ set -x # py file. We just want the executable. bin=($VERSION_PY_BINARY) bin="${bin[@]//*.py}" + +ls -l $(dirname $bin) + version_py_binary=$($bin) if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then From 5d609c2bbb0dc1f31ec65a0b6a283416afc4fcda Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:20:23 -0800 Subject: [PATCH 07/24] remove bazel from job name --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 611d6133a5..e27b5e06f2 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -95,7 +95,7 @@ matrix: tasks: # Keep in sync with .bcr/presubmit.yml bcr_tests: - name: BCR test module ${{ bazel }} + name: BCR test module platform: ${{ platform }} bazel: ${{ bazel }} working_directory: examples/bzlmod From 0fb2b2a1dd7df1bbd40dbe4421c31881e3b08ebd Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:24:28 -0800 Subject: [PATCH 08/24] just run 3_10 test, stat and env --- .bazelci/presubmit.yml | 3 ++- examples/bzlmod/tests/version_test.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index e27b5e06f2..615e31e225 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -112,4 +112,5 @@ tasks: - '--cxxopt=-std=c++14' - '--host_cxxopt=-std=c++14' test_targets: - - "//tests/..." + #- "//tests/..." + - "//tests:version_test_binary_3_10 diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 4ed7af1549..06dde9f1c8 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -17,6 +17,8 @@ set -o errexit -o nounset -o pipefail set -x +env + # VERSION_PY_BINARY is a space separate list of the executable and its main # py file. We just want the executable. bin=($VERSION_PY_BINARY) @@ -24,6 +26,7 @@ bin="${bin[@]//*.py}" ls -l $(dirname $bin) +stat $bin version_py_binary=$($bin) if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then From 2bd2bf580fe2a36379f0f521fd4eb129b3ae42d3 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:25:41 -0800 Subject: [PATCH 09/24] fix unclosed string --- .bazelci/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 615e31e225..3ab0c9058c 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -113,4 +113,4 @@ tasks: - '--host_cxxopt=-std=c++14' test_targets: #- "//tests/..." - - "//tests:version_test_binary_3_10 + - "//tests:version_test_binary_3_10" From e4d9506707ee1d27a723d83f03c685a227b849ff Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:31:08 -0800 Subject: [PATCH 10/24] try stat -L --- examples/bzlmod/tests/version_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 06dde9f1c8..1bc7d6f477 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -27,6 +27,7 @@ bin="${bin[@]//*.py}" ls -l $(dirname $bin) stat $bin +stat -L $bin version_py_binary=$($bin) if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then From 8a6cc36e676868f5d65790864a4bb851cde19464 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:34:11 -0800 Subject: [PATCH 11/24] try running python.exe --- examples/bzlmod/tests/version_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 1bc7d6f477..3e5d6cbb0d 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -28,6 +28,9 @@ ls -l $(dirname $bin) stat $bin stat -L $bin + +python.exe --version + version_py_binary=$($bin) if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then From 3421ab2448b39e8f788ce7ea4a17263be4eec405 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:43:55 -0800 Subject: [PATCH 12/24] try copying and running --- examples/bzlmod/tests/version_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 3e5d6cbb0d..5b482f20f0 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -29,7 +29,8 @@ ls -l $(dirname $bin) stat $bin stat -L $bin -python.exe --version +cp $bin mybin.exe +./mybin.exe version_py_binary=$($bin) From c9088c2793e2c9539cf51e5296ab8fe924c353af Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:47:52 -0800 Subject: [PATCH 13/24] also cp zip --- examples/bzlmod/tests/version_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 5b482f20f0..25c4152139 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -30,6 +30,7 @@ stat $bin stat -L $bin cp $bin mybin.exe +cp tests/version_3_10.zip mybin.zip ./mybin.exe version_py_binary=$($bin) From c94f6224d80afa4a611e97499389e0eea5862239 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Tue, 11 Nov 2025 21:49:26 -0800 Subject: [PATCH 14/24] stream testoutput --- .bazelci/presubmit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 3ab0c9058c..e7f80e79e1 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -111,6 +111,7 @@ tasks: # Without these cxxopts, BCR's Mac builds fail - '--cxxopt=-std=c++14' - '--host_cxxopt=-std=c++14' + - '--test_output=streamed' test_targets: #- "//tests/..." - "//tests:version_test_binary_3_10" From 60c2d7375c35b2bba16e749ed788cfffb7007acc Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 08:58:58 -0800 Subject: [PATCH 15/24] cp mybin.exe and run without zip --- examples/bzlmod/tests/version_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 25c4152139..f6960e156f 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -29,7 +29,12 @@ ls -l $(dirname $bin) stat $bin stat -L $bin + cp $bin mybin.exe +set +e +./mybin.exe + +set -e cp tests/version_3_10.zip mybin.zip ./mybin.exe From 79284baf33621873e1a21f0efd0fed178dcb13a1 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 09:04:11 -0800 Subject: [PATCH 16/24] run icacls, cmd.exe bin --- examples/bzlmod/tests/version_test.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index f6960e156f..99b5379a70 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -24,16 +24,22 @@ env bin=($VERSION_PY_BINARY) bin="${bin[@]//*.py}" -ls -l $(dirname $bin) +bindir=$(dirname $bin) + +set +e + +ls -l $bindir +dir $bindir stat $bin stat -L $bin - +icacls $bin cp $bin mybin.exe -set +e ./mybin.exe +cmd.exe $bin + set -e cp tests/version_3_10.zip mybin.zip ./mybin.exe From a576a288c0fd37fbb62cdd93b34c10dbf4cb527f Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 09:08:55 -0800 Subject: [PATCH 17/24] cmd /c invocation, try ./ --- examples/bzlmod/tests/version_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 99b5379a70..dae3f4bdcf 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -38,12 +38,15 @@ icacls $bin cp $bin mybin.exe ./mybin.exe -cmd.exe $bin +cmd.exe /c $bin +cmd.exe /c ./$bin set -e cp tests/version_3_10.zip mybin.zip ./mybin.exe +./$bin + version_py_binary=$($bin) if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then From c656684cd63d41fb13125ea88872a59a27f54d57 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 09:10:50 -0800 Subject: [PATCH 18/24] try two slashes per gemini --- examples/bzlmod/tests/version_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index dae3f4bdcf..925fa8eccc 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -38,8 +38,8 @@ icacls $bin cp $bin mybin.exe ./mybin.exe -cmd.exe /c $bin -cmd.exe /c ./$bin +cmd.exe //c $bin +cmd.exe //c ./$bin set -e cp tests/version_3_10.zip mybin.zip From 44e4bbcdf4d4ba1645cbb89dcb17324cb3c719cd Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 11:14:52 -0600 Subject: [PATCH 19/24] try backslash path --- examples/bzlmod/tests/version_test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 925fa8eccc..5163846d9c 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -38,8 +38,7 @@ icacls $bin cp $bin mybin.exe ./mybin.exe -cmd.exe //c $bin -cmd.exe //c ./$bin +cmd.exe //c tests\version_3_10.exe set -e cp tests/version_3_10.zip mybin.zip From 2b8ea4bd42a0cf1b232deec1374337ea66704460 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 11:19:08 -0600 Subject: [PATCH 20/24] set windows_enable_symlinks, ls -a, quote and double slash cmd.exe cmd --- examples/bzlmod/.bazelrc | 1 + examples/bzlmod/tests/version_test.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/bzlmod/.bazelrc b/examples/bzlmod/.bazelrc index ca83047ccc..e22a5b0256 100644 --- a/examples/bzlmod/.bazelrc +++ b/examples/bzlmod/.bazelrc @@ -7,4 +7,5 @@ test --test_output=errors --enable_runfiles # Windows requires these for multi-python support: build --enable_runfiles +build --windows_enable_symlinks common:bazel7.x --incompatible_python_disallow_native_rules diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 5163846d9c..17db5d7eaa 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -28,7 +28,7 @@ bindir=$(dirname $bin) set +e -ls -l $bindir +ls -la $bindir dir $bindir stat $bin @@ -38,7 +38,7 @@ icacls $bin cp $bin mybin.exe ./mybin.exe -cmd.exe //c tests\version_3_10.exe +cmd.exe //c "tests\\version_3_10.exe" set -e cp tests/version_3_10.zip mybin.zip From 280a696eefac24300ffa34f8ace7d1a360fdd1d8 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 11:20:39 -0600 Subject: [PATCH 21/24] move windows enable symlinks to startup --- examples/bzlmod/.bazelrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/bzlmod/.bazelrc b/examples/bzlmod/.bazelrc index e22a5b0256..d8ca434d57 100644 --- a/examples/bzlmod/.bazelrc +++ b/examples/bzlmod/.bazelrc @@ -1,3 +1,5 @@ +startup --windows_enable_symlinks + common --enable_bzlmod common --lockfile_mode=update @@ -7,5 +9,4 @@ test --test_output=errors --enable_runfiles # Windows requires these for multi-python support: build --enable_runfiles -build --windows_enable_symlinks common:bazel7.x --incompatible_python_disallow_native_rules From 5bbfb9fca8f61bcb6681f91582ec9654a6cf1cba Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 11:21:56 -0600 Subject: [PATCH 22/24] try quoted single slash, un quoted double slash --- examples/bzlmod/tests/version_test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 17db5d7eaa..7060e4487c 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -38,8 +38,12 @@ icacls $bin cp $bin mybin.exe ./mybin.exe +cmd.exe //c tests\\version_3_10.exe + cmd.exe //c "tests\\version_3_10.exe" +cmd.exe //c "tests\version_3_10.exe" + set -e cp tests/version_3_10.zip mybin.zip ./mybin.exe From 47931d2fcbdcc7844af39f89a79cce30194b4f58 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 09:58:52 -0800 Subject: [PATCH 23/24] remove windows enable symlinks, try various bazel 8 versions --- .bazelci/presubmit.yml | 3 +- examples/bzlmod/.bazelrc | 2 +- examples/bzlmod/tests/version_test.sh | 42 +++++++++++++-------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index e7f80e79e1..42650feae5 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -91,7 +91,8 @@ buildifier: matrix: platform: - windows - bazel: [7.*, 8.*] + #bazel: [7.*, 8.*] + bazel: [8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0] tasks: # Keep in sync with .bcr/presubmit.yml bcr_tests: diff --git a/examples/bzlmod/.bazelrc b/examples/bzlmod/.bazelrc index d8ca434d57..7c1085102b 100644 --- a/examples/bzlmod/.bazelrc +++ b/examples/bzlmod/.bazelrc @@ -1,4 +1,4 @@ -startup --windows_enable_symlinks +#startup --windows_enable_symlinks common --enable_bzlmod common --lockfile_mode=update diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 7060e4487c..4c8cb755a2 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -26,27 +26,27 @@ bin="${bin[@]//*.py}" bindir=$(dirname $bin) -set +e - -ls -la $bindir -dir $bindir - -stat $bin -stat -L $bin -icacls $bin - -cp $bin mybin.exe -./mybin.exe - -cmd.exe //c tests\\version_3_10.exe - -cmd.exe //c "tests\\version_3_10.exe" - -cmd.exe //c "tests\version_3_10.exe" - -set -e -cp tests/version_3_10.zip mybin.zip -./mybin.exe +##set +e +## +##ls -la $bindir +##dir $bindir +## +##stat $bin +##stat -L $bin +##icacls $bin +## +##cp $bin mybin.exe +##./mybin.exe +## +##cmd.exe //c tests\\version_3_10.exe +## +##cmd.exe //c "tests\\version_3_10.exe" +## +##cmd.exe //c "tests\version_3_10.exe" +## +##set -e +##cp tests/version_3_10.zip mybin.zip +##./mybin.exe ./$bin From 7779e92a4a7d7c8000d5718a3a50074e69276e3d Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 12 Nov 2025 13:11:28 -0800 Subject: [PATCH 24/24] nop --- examples/bzlmod/tests/version_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/bzlmod/tests/version_test.sh b/examples/bzlmod/tests/version_test.sh index 4c8cb755a2..c11d506c62 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -26,6 +26,7 @@ bin="${bin[@]//*.py}" bindir=$(dirname $bin) +# ##set +e ## ##ls -la $bindir