diff options
author | tomlu <tomlu@google.com> | 2018-06-02 10:20:16 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-02 10:21:47 -0700 |
commit | aaf11e91a02a2f42d8bf26cce76df941c8afc8e2 (patch) | |
tree | 53620e9342a4f81e48a241cbe4f707584ff904d3 /src/main/java/com/google/devtools/build/lib/syntax | |
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/syntax')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java index d19b2db21c..1a5cc170b6 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemantics.java @@ -59,6 +59,8 @@ public abstract class SkylarkSemantics { public abstract boolean incompatibleNewActionsApi(); + public abstract boolean incompatibleNoSupportToolsInActionInputs(); + public abstract boolean incompatiblePackageNameIsAFunction(); public abstract boolean incompatibleRemoveNativeGitRepository(); @@ -94,6 +96,7 @@ public abstract class SkylarkSemantics { .incompatibleDisallowOldStyleArgsAdd(false) .incompatibleDisallowSlashOperator(false) .incompatibleNewActionsApi(false) + .incompatibleNoSupportToolsInActionInputs(false) .incompatiblePackageNameIsAFunction(false) .incompatibleRemoveNativeGitRepository(false) .incompatibleRemoveNativeHttpArchive(false) @@ -126,6 +129,8 @@ public abstract class SkylarkSemantics { public abstract Builder incompatibleNewActionsApi(boolean value); + public abstract Builder incompatibleNoSupportToolsInActionInputs(boolean value); + public abstract Builder incompatiblePackageNameIsAFunction(boolean value); public abstract Builder incompatibleRemoveNativeGitRepository(boolean value); |