From 0a47a1fb04efef598376d4ee7b383add1febcc6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 14 Apr 2023 16:11:53 -0700 Subject: [PATCH] Escalate the "analysis cache discarded" message from "info" to "warn", and add some text to advise that discarding the analysis cache may be expensive. PiperOrigin-RevId: 524409797 Change-Id: Iabafdd62e66d7be57fc6383d8af9c2ef3d707fc0 --- .../devtools/build/lib/skyframe/SkyframeBuildView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java index 52e0a6a12fa04c..74272b1879d908 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeBuildView.java @@ -273,14 +273,15 @@ public void setConfiguration( EventHandler eventHandler, BuildConfigurationValue configuration, int maxDifferencesToShow) { if (skyframeAnalysisWasDiscarded) { eventHandler.handle( - Event.info( + Event.warn( "--discard_analysis_cache was used in the previous build, " + "discarding analysis cache.")); skyframeExecutor.handleAnalysisInvalidatingChange(); } else { String diff = describeConfigurationDifference(configuration, maxDifferencesToShow); if (diff != null) { - eventHandler.handle(Event.info(diff + ", discarding analysis cache.")); + eventHandler.handle( + Event.warn(diff + ", discarding analysis cache (this can be expensive).")); // Note that clearing the analysis cache is currently required for correctness. It is also // helpful to save memory. //