Skip to content

Conversation

@bazel-io
Copy link
Member

This mostly requires wiring up the existing machinery for structured variables and (most) link build variables.

Utility methods on PathMappers are moved to PathMapper so that they can be dependend on by AbstractCommandLine without creating a cycle.

NEW:

  • Allow toolchain variables to be None and skip them in that case, matching the previous behavior.
  • Use the effective output paths mode for fingerprinting to preserve action cache entries for non-path mapped actions even when path mapping is generally enabled.

Closes #25154.

PiperOrigin-RevId: 721850758
Change-Id: I34a66006ba4c8fd73d62ce8cea249577f62a1b02

Commit 08f0709

…ppArchive`

This mostly requires wiring up the existing machinery for structured variables and (most) link build variables.

Utility methods on `PathMappers` are moved to `PathMapper` so that they can be dependend on by `AbstractCommandLine` without creating a cycle.

NEW:
- Allow toolchain variables to be None and skip them in that case, matching the previous behavior.
- Use the effective output paths mode for fingerprinting to preserve action cache entries for non-path mapped actions even when path mapping is generally enabled.

Closes bazelbuild#25154.

PiperOrigin-RevId: 721850758
Change-Id: I34a66006ba4c8fd73d62ce8cea249577f62a1b02
@bazel-io bazel-io requested a review from a team as a code owner January 31, 2025 19:56
@bazel-io bazel-io added team-Performance Issues for Performance teams team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-Java Issues for Java rules team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Jan 31, 2025
@fmeum
Copy link
Collaborator

fmeum commented Jan 31, 2025

You can merge this PR to fix the build: bazel-io#3

The diff:

--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/LinkBuildVariablesTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/LinkBuildVariablesTest.java
@@ -513,7 +513,9 @@ public class LinkBuildVariablesTest extends LinkBuildVariablesTestCase {
 
     assertThrows(
         ExpansionException.class,
-        () -> testVariables.getVariable(LinkBuildVariables.IS_CC_TEST.getVariableName()));
+        () ->
+            testVariables.getVariable(
+                LinkBuildVariables.IS_CC_TEST.getVariableName(), PathMapper.NOOP));
 
     ConfiguredTarget binaryTarget = getConfiguredTarget("//x:foo");
     CcToolchainVariables binaryVariables =
@@ -521,7 +523,9 @@ public class LinkBuildVariablesTest extends LinkBuildVariablesTestCase {
 
     assertThrows(
         ExpansionException.class,
-        () -> binaryVariables.getVariable(LinkBuildVariables.IS_CC_TEST.getVariableName()));
+        () ->
+            binaryVariables.getVariable(
+                LinkBuildVariables.IS_CC_TEST.getVariableName(), PathMapper.NOOP));
   }
 
   @Test

@iancha1992 iancha1992 enabled auto-merge January 31, 2025 20:26
@iancha1992
Copy link
Member

@fmeum fixed! Thank you

@iancha1992 iancha1992 requested review from comius and hvadehra January 31, 2025 20:28
@iancha1992 iancha1992 added this pull request to the merge queue Feb 3, 2025
Merged via the queue into bazelbuild:release-8.1.0 with commit c1e77c8 Feb 3, 2025
45 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions team-Performance Issues for Performance teams team-Rules-CPP Issues for C++ rules team-Rules-Java Issues for Java rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants