From fd3357505fd63415ba75836f0cb19c8c80b96324 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 9 May 2023 11:42:53 -0700 Subject: [PATCH] [Skymeld] Gracefully handle the incompatibility with BwoB. PiperOrigin-RevId: 530670590 Change-Id: Ia67ce990bd34065e83609e4d030918b2fcdccd53 --- .../com/google/devtools/build/lib/skyframe/BUILD | 1 + .../build/lib/skyframe/SkymeldModule.java | 15 +++++++++++++++ .../BuildWithoutTheBytesIntegrationTest.java | 2 ++ 3 files changed, 18 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BUILD b/src/main/java/com/google/devtools/build/lib/skyframe/BUILD index 3bf167387c15c7..268cdb3c5ce7c1 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/BUILD +++ b/src/main/java/com/google/devtools/build/lib/skyframe/BUILD @@ -2416,6 +2416,7 @@ java_library( "//src/main/java/com/google/devtools/build/lib/analysis:analysis_options", "//src/main/java/com/google/devtools/build/lib/events", "//src/main/java/com/google/devtools/build/lib/pkgcache", + "//src/main/java/com/google/devtools/build/lib/remote/options", ], ) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkymeldModule.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkymeldModule.java index 9a269ef0268d04..7c5e75757932b4 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkymeldModule.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkymeldModule.java @@ -17,6 +17,7 @@ import com.google.devtools.build.lib.buildtool.BuildRequestOptions; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.pkgcache.PathPackageLocator; +import com.google.devtools.build.lib.remote.options.RemoteOptions; import com.google.devtools.build.lib.runtime.BlazeModule; import com.google.devtools.build.lib.runtime.CommandEnvironment; @@ -94,6 +95,20 @@ boolean determineIfMergingAnalysisExecution(CommandEnvironment env) { + " generating an aquery dump after builds and its value will be ignored.")); effectiveValue = false; } + if (effectiveValue + && env.getOptions().getOptions(RemoteOptions.class) != null + && !env.getOptions() + .getOptions(RemoteOptions.class) + .remoteOutputsMode + .downloadAllOutputs()) { + env.getReporter() + .handle( + Event.warn( + "--experimental_merged_skyframe_analysis_execution is incompatible with" + + " --remote_download_outputs=(minimal|toplevel) and its value will be" + + " ignored.")); + effectiveValue = false; + } return effectiveValue; } diff --git a/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java index ffecdfb109b082..72aaba62b77ad4 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java @@ -60,6 +60,8 @@ protected void setupOptions() throws Exception { "--remote_download_minimal", "--dynamic_local_strategy=standalone", "--dynamic_remote_strategy=remote"); + // (b/281655526) Skymeld is incompatible. + addOptions("--noexperimental_merged_skyframe_analysis_execution"); } @Override