Skip to content

Commit

Permalink
Document the 'aspect' field in TargetConfiguredId/TargetCompletedId BEP.
Browse files Browse the repository at this point in the history
As aspect usage grows throughout the Bazel ecosystem, their appearance in BEP
output will grow. It is important for BEP consumers to check the 'aspect' field
in these two event IDs to avoid being confused when multiple events appear for
the same target.

RELNOTES: None.
PiperOrigin-RevId: 343921155
  • Loading branch information
michaeledgar authored and copybara-github committed Nov 23, 2020
1 parent bb1e635 commit 4f044e0
Showing 1 changed file with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,18 @@ message BuildEventId {
message TargetConfiguredId {
string label = 1;

// If not empty, the id refers to the expansion of the target for a given
// aspect.
// If empty, the id refers to the expansion of the target. If not-empty,
// the id refers to the expansion of an aspect applied to the (already
// expanded) target.
//
// For example, when building an apple_binary that depends on proto_library
// "//:foo_proto", there will be two TargetConfigured events for
// "//:foo_proto":
//
// 1. An event with an empty aspect, corresponding to actions producing
// language-agnostic outputs from the proto_library; and
// 2. An event with aspect "ObjcProtoAspect", corresponding to Objective-C
// code generation.
string aspect = 2;
}

Expand Down Expand Up @@ -127,8 +137,18 @@ message BuildEventId {
// The configuration for which the target was built.
ConfigurationId configuration = 3;

// If not empty, the id refers to the completion of the target for a given
// aspect.
// If empty, the id refers to the completion of the target. If not-empty,
// the id refers to the completion of an aspect applied to the (already
// completed) target.
//
// For example, when building an apple_binary that depends on proto_library
// "//:foo_proto", there will be two TargetCompleted events for
// "//:foo_proto":
//
// 1. An event with an empty aspect, corresponding to actions producing
// language-agnostic outputs from the proto_library; and
// 2. An event with aspect "ObjcProtoAspect", corresponding to Objective-C
// code generation.
string aspect = 2;
}

Expand Down

0 comments on commit 4f044e0

Please sign in to comment.