diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 1cb3a01365..42650feae5 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -87,586 +87,32 @@ buildifier: - //tests:version_3_11_test - //tests:version_3_9_test - //tests:version_default_test -tasks: - 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/..." +matrix: + platform: + - windows + #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: + name: BCR test module + platform: ${{ platform }} + bazel: ${{ bazel }} + 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"] 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" + # Without these cxxopts, BCR's Mac builds fail + - '--cxxopt=-std=c++14' + - '--host_cxxopt=-std=c++14' + - '--test_output=streamed' 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_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 - <<: *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//..." + #- "//tests/..." + - "//tests:version_test_binary_3_10" 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/examples/bzlmod/.bazelrc b/examples/bzlmod/.bazelrc index ca83047ccc..7c1085102b 100644 --- a/examples/bzlmod/.bazelrc +++ b/examples/bzlmod/.bazelrc @@ -1,3 +1,5 @@ +#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 3f5fd960cb..c11d506c62 100755 --- a/examples/bzlmod/tests/version_test.sh +++ b/examples/bzlmod/tests/version_test.sh @@ -15,11 +15,42 @@ 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) 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 + +./$bin + version_py_binary=$($bin) if [[ "${version_py_binary}" != "${VERSION_CHECK}" ]]; then 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=