aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/VisibilityErrorEvent.java7
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto22
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PatternExpandingError.java9
3 files changed, 18 insertions, 20 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/VisibilityErrorEvent.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/VisibilityErrorEvent.java
index afe4e34bc3..19e0fca92c 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/VisibilityErrorEvent.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/VisibilityErrorEvent.java
@@ -50,8 +50,11 @@ public class VisibilityErrorEvent implements BuildEventWithConfiguration {
@Override
public BuildEventStreamProtos.BuildEvent asStreamProto(BuildEventConverters converters) {
return GenericBuildEvent.protoChaining(this)
- .setAnalysisFailed(
- BuildEventStreamProtos.AnalysisFailure.newBuilder().setDetails(errorMessage).build())
+ .setAborted(
+ BuildEventStreamProtos.Aborted.newBuilder()
+ .setReason(BuildEventStreamProtos.Aborted.AbortReason.ANALYSIS_FAILURE)
+ .setDescription(errorMessage)
+ .build())
.build();
}
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto
index 7e8253e244..1c54a6ed6e 100644
--- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto
+++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto
@@ -192,6 +192,12 @@ message Aborted {
// Failure due to reasons entirely internal to the build tool, e.g.,
// running out of memory.
INTERNAL = 4;
+
+ // A Failure occurred in the loading phase of a target.
+ LOADING_FAILURE = 5;
+
+ // A Failure occurred in the analysis phase of a target.
+ ANALYSIS_FAILURE = 6;
}
AbortReason reason = 1;
@@ -200,19 +206,6 @@ message Aborted {
string description = 2;
}
-// Payload of an event indicating that an expected event will not come, as
-// something went wrong when attempting to load the corresponding package.
-message LoadingFailure {
- string details = 1;
-}
-
-// Payload of an event indicating that an expected event will not come, as
-// something went wrong during analysis. If the analysis of a target failed,
-// the id of the event will be the corresponding TargetCompletedId.
-message AnalysisFailure {
- string details = 1;
-}
-
// Payload of an event indicating the beginning of a new build. Usually, events
// of those type start a new build-event stream. The target pattern requested
// to be build is contained in one of the announced child events; it is an
@@ -487,14 +480,13 @@ message BuildFinished {
// that is observed, is provided in the payload. More options for the payload
// might be added in the future.
message BuildEvent {
+ reserved 11, 19;
BuildEventId id = 1;
repeated BuildEventId children = 2;
bool last_message = 20;
oneof payload {
Progress progress = 3;
Aborted aborted = 4;
- LoadingFailure loading_failed = 11;
- AnalysisFailure analysis_failed = 19;
BuildStarted started = 5;
CommandLine command_line = 12;
OptionsParsed options_parsed = 13;
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PatternExpandingError.java b/src/main/java/com/google/devtools/build/lib/skyframe/PatternExpandingError.java
index 463fbfbde1..1d94871501 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PatternExpandingError.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PatternExpandingError.java
@@ -59,8 +59,11 @@ public final class PatternExpandingError implements BuildEvent {
@Override
public BuildEventStreamProtos.BuildEvent asStreamProto(BuildEventConverters converters) {
- BuildEventStreamProtos.LoadingFailure failure =
- BuildEventStreamProtos.LoadingFailure.newBuilder().setDetails(message).build();
- return GenericBuildEvent.protoChaining(this).setLoadingFailed(failure).build();
+ BuildEventStreamProtos.Aborted failure =
+ BuildEventStreamProtos.Aborted.newBuilder()
+ .setReason(BuildEventStreamProtos.Aborted.AbortReason.LOADING_FAILURE)
+ .setDescription(message)
+ .build();
+ return GenericBuildEvent.protoChaining(this).setAborted(failure).build();
}
}