Support for cc_toolchain enironment variables - #8400
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for resolving /proc/self/cwd paths to absolute paths within the Bazel execution root, adding an EnvironmentProcessor extension point and a ProcSelfCwdEnvironmentProcessor implementation to handle toolchain environment variables. It also updates path resolution logic in ExecutionRootPath, CoptsIncludeProcessor, and CoptsSysrootProcessor. The review feedback highlights several critical issues, including a missing break statement in a switch block in BlazeConfigurationToolchainResolver, broken unit tests in ProcSelfCwdEnvironmentProcessorTest that attempt to modify an ImmutableMap in-place, potential NullPointerExceptions in ProcSelfCwdEnvironmentProcessor and CoptsSysrootProcessor due to unchecked path resolution, a loss of environment variable insertion order in EnvironmentProcessor, and a missing null check in ExecutionRootPath.tryCreate.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
29eae20 to
ce3012d
Compare
2fb57d3 to
e5554dc
Compare
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
# Conflicts: # cpp/src/com/google/idea/blaze/cpp/BlazeConfigurationToolchainResolver.java
# Conflicts: # MODULE.bazel # MODULE.bazel.lock
e5554dc to
84f85cb
Compare
Correctly forward environment variables collect by the aspect to the CidrToolEnvironment. Also expand any /proc/self/cwd references.