commit | 146b9ff312b544816e898ef868b873c12fe1a6fa | [log] [tgz] |
---|---|---|
author | cparsons <cparsons@google.com> | Fri Jun 21 09:45:14 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Jun 21 09:46:30 2019 -0700 |
tree | 23abda508b253f5eb0d41b481e6f301d4552f99d | |
parent | b95f3815dc3a9a187dcf3093cfce3961de882f2c [diff] [blame] |
Change ruleContext.hasError() to reflect even suppressed errors This makes error-checking logic more consistent, even under --allow_analysis_failures. This also requires some changes to target factories to ensure they are aware of allow_analysis_failures mode, and will propagate non-null error-messaging targets in cases of this mode. Fixes https://github.com/bazelbuild/bazel/issues/8234 RELNOTES: None. PiperOrigin-RevId: 254413823
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java index 72549d1..e8a820c 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -377,7 +377,7 @@ @Override public boolean hasErrors() { - return getAnalysisEnvironment().hasErrors(); + return reporter.hasErrors(); } /**