diff options
author | 2018-02-02 15:52:22 -0800 | |
---|---|---|
committer | 2018-02-02 15:53:55 -0800 | |
commit | a56a6adf7c5d2829ea99f393f1a2d2d3d4488e0f (patch) | |
tree | 2a7ec0955afd09a9fb1d39801b85dca6c2567bba /src/main/java/com/google/devtools/build/lib/rules/proto | |
parent | 64d9a4d6dcd720a3b7a60ff550a17a7707dd41d0 (diff) |
Stop allowing generic LateBoundDefault value types. Such types are always either a Label or a List<Label>. We can easily enforce this through static type checking, so do it.
This will help with LateBoundDefault serialization, since we don't have to serialize an arbitrary object.
PiperOrigin-RevId: 184347100
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/proto')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java index e8ffdd6190..557cf5fa15 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibraryRule.java @@ -35,8 +35,8 @@ public final class BazelProtoLibraryRule implements RuleDefinition { private static final Label DEFAULT_PROTO_COMPILER = Label.parseAbsoluteUnchecked("@com_google_protobuf//:protoc"); - private static final Attribute.LateBoundDefault<?, Label> PROTO_COMPILER = - Attribute.LateBoundDefault.fromTargetConfiguration( + private static final Attribute.LabelLateBoundDefault<?> PROTO_COMPILER = + Attribute.LabelLateBoundDefault.fromTargetConfiguration( ProtoConfiguration.class, DEFAULT_PROTO_COMPILER, (rule, attributes, protoConfig) -> |