Skip to content

Commit

Permalink
Escalate the "analysis cache discarded" message from "info" to "warn"…
Browse files Browse the repository at this point in the history
…, and add some text to advise that discarding the analysis cache may be expensive.

PiperOrigin-RevId: 524409797
Change-Id: Iabafdd62e66d7be57fc6383d8af9c2ef3d707fc0
  • Loading branch information
tkoeppe authored and copybara-github committed Apr 14, 2023
1 parent c3550ed commit 0a47a1f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down

0 comments on commit 0a47a1f

Please sign in to comment.