Fix NPE caused by --repo_env with no value set#28606
Fix NPE caused by --repo_env with no value set#28606JSGette wants to merge 4 commits intobazelbuild:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request addresses a NullPointerException that occurs when --repo_env is used with an environment variable that is not set. The fix involves adding a null check for the environment variable's value. If the value is null, a warning is issued, and the variable is ignored, preventing the crash. The change is correct and effectively resolves the issue.
|
@bazel-io fork 9.0.1 |
|
@bazel-io fork 9.1.0 |
fmeum
left a comment
There was a problem hiding this comment.
Could you add test coverage to the tests touched by the culprit?
| repoEnvBuilder.put(name, value); | ||
| nonstrictRepoEnvBuilder.put(name, value); | ||
| } else { | ||
| warnings.add( |
There was a problem hiding this comment.
I don't think we need to (or should) warn here, not being set is an entirely fine state to inherit.
There was a problem hiding this comment.
I thought about it for a moment but then I remembered several occasions when envvars were leaking into build context and the only way to detect that was to compare 2 heavy execution logs. Also, this may be informative to quickly identify differences in local and CI environments. But I am fine to remove this
Done |
19deb3f to
e94312a
Compare
This is to address bazelbuild#28605. bazel crashes with `NullPointerException` in case `--repo_env=NON_EXISTENT` is used with no value set in user's local environment. It worked in `8.5.1` but doesn't in `9.0.0` so it seems like a regression. Closes bazelbuild#28606. PiperOrigin-RevId: 868871905 Change-Id: I0ecd9a4b76b7795e1f00583050aaf343fe930832
This is to address bazelbuild#28605. bazel crashes with `NullPointerException` in case `--repo_env=NON_EXISTENT` is used with no value set in user's local environment. It worked in `8.5.1` but doesn't in `9.0.0` so it seems like a regression. Closes bazelbuild#28606. PiperOrigin-RevId: 868871905 Change-Id: I0ecd9a4b76b7795e1f00583050aaf343fe930832
This is to address #28605. bazel crashes with `NullPointerException` in case `--repo_env=NON_EXISTENT` is used with no value set in user's local environment. It worked in `8.5.1` but doesn't in `9.0.0` so it seems like a regression. Closes #28606. PiperOrigin-RevId: 868871905 Change-Id: I0ecd9a4b76b7795e1f00583050aaf343fe930832 Commit b55b69d Co-authored-by: Joseph Gette <joseph.gette@datadoghq.com>
This is to address #28605. bazel crashes with `NullPointerException` in case `--repo_env=NON_EXISTENT` is used with no value set in user's local environment. It worked in `8.5.1` but doesn't in `9.0.0` so it seems like a regression. Closes #28606. PiperOrigin-RevId: 868871905 Change-Id: I0ecd9a4b76b7795e1f00583050aaf343fe930832 Commit b55b69d Co-authored-by: Joseph Gette <joseph.gette@datadoghq.com>
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4 (resolved version in Bazel 9 dep graph) - `apple_support` 1.24.1 → 1.24.2 - `libarchive` 3.8.1 → 3.8.1.bcr.2, whose transitive `bzip2` dep (pinned to 1.0.8.bcr.4 via `single_version_override`) ships a Bazel 9-compatible BUILD file with explicit `load()` statements - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4: `bazel_tools@_` (Bazel 9's built-in module) requires `protobuf@33.4`; MVS propagates it to all deps - `apple_support` 1.24.1 → 1.24.2: same root cause (`bazel_tools@_`) - `libarchive` 3.8.1 → 3.8.1.bcr.2: `3.8.1` pulls in `bzip2@1.0.8.bcr.1` which lacks the `:bz2` target; `.bcr.2` requires `bzip2@1.0.8.bcr.3` which has it - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4: `bazel_tools@_` (Bazel 9's built-in module) requires `protobuf@33.4`; MVS propagates it to all deps - `apple_support` 1.24.1 → 1.24.2: same root cause (`bazel_tools@_`) - `libarchive` 3.8.1 → 3.8.1.bcr.2: `3.8.1` pulls in `bzip2@1.0.8.bcr.1` which lacks the `:bz2` target; `.bcr.2` requires `bzip2@1.0.8.bcr.3` which has it - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4: `bazel_tools@_` (Bazel 9's built-in module) requires `protobuf@33.4`; MVS propagates it to all deps - `apple_support` 1.24.1 → 1.24.2: same root cause (`bazel_tools@_`) - `libarchive` 3.8.1 → 3.8.1.bcr.2: `3.8.1` pulls in `bzip2@1.0.8.bcr.1` which lacks the `:bz2` target; `.bcr.2` requires `bzip2@1.0.8.bcr.3` which has it - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Changes required: - `.bazelversion`: 8.6.0 → 9.0.1 - `MODULE.bazel`: - `protobuf` 29.1 → 33.4: `bazel_tools@_` (Bazel 9's built-in module) requires `protobuf@33.4`; MVS propagates it to all deps - `apple_support` 1.24.1 → 1.24.2: same root cause (`bazel_tools@_`) - `libarchive` 3.8.1 → 3.8.1.bcr.2: `3.8.1` pulls in `bzip2@1.0.8.bcr.1` which lacks the `:bz2` target; `.bcr.2` requires `bzip2@1.0.8.bcr.3` which has it - `gcc_toolchain`: add patch 0005 (see below) - `bazel/toolchains/mingw/toolchain.bzl`: drop `provides = [CcToolchainConfigInfo]`; `CcToolchainConfigInfo` was never imported so it evaluated to `None`, which Bazel 9 rejects - `bazel/patches/gcc-toolchain/0005-fix-bazel-9-compat.patch`: same fix for `gcc_toolchain`'s `cc_toolchain_config.bzl`; also adds explicit `cc_common` load and `cc_library` to the generated BUILD template, both required by Bazel 9 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Groundwork landed in advance: - #47716: Bump `rules_cc` with explicit loads for Bazel 9 - #47745: Fix `rules_cc` leftovers from #47716 for Bazel 9 - #47982: Add explicit `cc_static_library` import for Bazel 9 - #48016: Add explicit `py_binary` import for Bazel 9 - #48071: Bump `rules_foreign_cc` for Bazel 9 fixes - #48082: Bump `rules_python` to 1.9.0 and fix misuses spotted on Windows - #48183: Fix Python hermetic toolchain check for Bazel 9 - #48186: Disable `repo_contents_cache` when in-workspace for Bazel 9 - #48228: Bump `protobuf` Bazel dep to 34.1
### What does this PR do? Upgrades the Bazel toolchain from 8.6.0 to 9.0.1. ### Motivation 9.0.1 ships two upstream fixes that directly benefit our build: - bazelbuild/bazel#28606: NPE when `--repo_env` is set to an env var that has no value — contributed by Datadog (Joseph Gette). - bazelbuild/bazel#26842: `DefaultSyscallCache` incorrectly treated `BUILD` files and `build` directories as the same entry on case-insensitive / normalizing filesystems (e.g. Linux container on a macOS host), causing spurious build failures. ### Describe how you validated your changes `bazel test //...` passes. ### Additional Notes Groundwork landed in advance: - #47716: Bump `rules_cc` with explicit loads for Bazel 9 - #47745: Fix `rules_cc` leftovers from #47716 for Bazel 9 - #47982: Add explicit `cc_static_library` import for Bazel 9 - #48016: Add explicit `py_binary` import for Bazel 9 - #48071: Bump `rules_foreign_cc` for Bazel 9 fixes - #48082: Bump `rules_python` to 1.9.0 and fix misuses spotted on Windows - #48183: Fix Python hermetic toolchain check for Bazel 9 - #48186: Disable `repo_contents_cache` when in-workspace for Bazel 9 - #48228: Bump `protobuf` Bazel dep to 34.1
This is to address #28605. bazel crashes with
NullPointerExceptionin case--repo_env=NON_EXISTENTis used with no value set in user's local environment. It worked in8.5.1but doesn't in9.0.0so it seems like a regression.