diff options
author | 2018-06-02 10:20:16 -0700 | |
---|---|---|
committer | 2018-06-02 10:21:47 -0700 | |
commit | aaf11e91a02a2f42d8bf26cce76df941c8afc8e2 (patch) | |
tree | 53620e9342a4f81e48a241cbe4f707584ff904d3 /src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java | |
parent | 452141ffc66a3cbd27c597001585ade4251a307f (diff) |
Make tools in action inputs an error.
Supporting tools in inputs introduces a slow linear scan. Such tools should be moved to the 'tools' attribute. If --incompatible_no_support_tools_in_action_inputs is set the inputs are scanned, but a helpful error message is issued to the user.
Eventually we will remove the slow scanning. Errors will surface in the execution phase instead of during analysis, and the resulting error messages will be less obvious.
RELNOTES: None
RELNOTES[INC]: With --incompatible_no_support_tools_in_action_inputs enabled, Skylark action inputs are no longer scanned for tools. Move any such inputs to the newly introduced 'tools' attribute.
PiperOrigin-RevId: 198996093
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/SkylarkSemanticsCodec.java | 2 |
1 files changed, 2 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 28b3c6747a..758eb39155 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 @@ -53,6 +53,7 @@ public final class SkylarkSemanticsCodec implements ObjectCodec<SkylarkSemantics codedOut.writeBoolNoTag(semantics.incompatibleDisallowOldStyleArgsAdd()); codedOut.writeBoolNoTag(semantics.incompatibleDisallowSlashOperator()); codedOut.writeBoolNoTag(semantics.incompatibleNewActionsApi()); + codedOut.writeBoolNoTag(semantics.incompatibleNoSupportToolsInActionInputs()); codedOut.writeBoolNoTag(semantics.incompatiblePackageNameIsAFunction()); codedOut.writeBoolNoTag(semantics.incompatibleRemoveNativeGitRepository()); codedOut.writeBoolNoTag(semantics.incompatibleRemoveNativeHttpArchive()); @@ -76,6 +77,7 @@ public final class SkylarkSemanticsCodec implements ObjectCodec<SkylarkSemantics builder.incompatibleDisallowOldStyleArgsAdd(codedIn.readBool()); builder.incompatibleDisallowSlashOperator(codedIn.readBool()); builder.incompatibleNewActionsApi(codedIn.readBool()); + builder.incompatibleNoSupportToolsInActionInputs(codedIn.readBool()); builder.incompatiblePackageNameIsAFunction(codedIn.readBool()); builder.incompatibleRemoveNativeGitRepository(codedIn.readBool()); builder.incompatibleRemoveNativeHttpArchive(codedIn.readBool()); |