diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java | 2 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsOptions.java | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java index 1edc800c2b..0c0ece9971 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java +++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java @@ -44,6 +44,7 @@ public final class SkylarkSemanticsCodec implements ObjectCodec<SkylarkSemantics codedOut.writeBoolNoTag(semantics.incompatibleCheckedArithmetic()); codedOut.writeBoolNoTag(semantics.incompatibleComprehensionVariablesDoNotLeak()); codedOut.writeBoolNoTag(semantics.incompatibleDepsetIsNotIterable()); + codedOut.writeBoolNoTag(semantics.incompatibleDepsetUnion()); codedOut.writeBoolNoTag(semantics.incompatibleDictLiteralHasNoDuplicates()); codedOut.writeBoolNoTag(semantics.incompatibleDisallowDictPlus()); codedOut.writeBoolNoTag(semantics.incompatibleDisallowKeywordOnlyArgs()); @@ -68,6 +69,7 @@ public final class SkylarkSemanticsCodec implements ObjectCodec<SkylarkSemantics builder.incompatibleCheckedArithmetic(codedIn.readBool()); builder.incompatibleComprehensionVariablesDoNotLeak(codedIn.readBool()); builder.incompatibleDepsetIsNotIterable(codedIn.readBool()); + builder.incompatibleDepsetUnion(codedIn.readBool()); builder.incompatibleDictLiteralHasNoDuplicates(codedIn.readBool()); builder.incompatibleDisallowDictPlus(codedIn.readBool()); builder.incompatibleDisallowKeywordOnlyArgs(codedIn.readBool()); diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsOptions.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsOptions.java index 359cce86f0..22598ce7eb 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsOptions.java +++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsOptions.java @@ -99,6 +99,19 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable public boolean incompatibleComprehensionVariablesDoNotLeak; @Option( + name = "incompatible_depset_union", + defaultValue = "false", + category = "incompatible changes", + documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, + effectTags = {OptionEffectTag.UNKNOWN}, + metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE}, + help = + "If set to true, depset union using `+`, `|` or `.union` are forbidden. " + + "Use the `depset` constructor instead." + ) + public boolean incompatibleDepsetUnion; + + @Option( name = "incompatible_depset_is_not_iterable", defaultValue = "false", category = "incompatible changes", @@ -265,6 +278,7 @@ public class SkylarkSemanticsOptions extends OptionsBase implements Serializable .incompatibleCheckedArithmetic(incompatibleCheckedArithmetic) .incompatibleComprehensionVariablesDoNotLeak(incompatibleComprehensionVariablesDoNotLeak) .incompatibleDepsetIsNotIterable(incompatibleDepsetIsNotIterable) + .incompatibleDepsetUnion(incompatibleDepsetUnion) .incompatibleDictLiteralHasNoDuplicates(incompatibleDictLiteralHasNoDuplicates) .incompatibleDisallowDictPlus(incompatibleDisallowDictPlus) .incompatibleDisallowKeywordOnlyArgs(incompatibleDisallowKeywordOnlyArgs) |