From 823b7e3dfc874c82158dcd07eaedf6f57a3b2da4 Mon Sep 17 00:00:00 2001 From: John Cater Date: Tue, 1 Aug 2023 08:38:17 -0400 Subject: [PATCH] Remove the obsolete `exec_tools` attribute from `genrule`. DO NOT SUBMIT. Part of #19132. --- .../lib/bazel/rules/genrule/BazelGenRule.java | 10 ---------- .../bazel/rules/genrule/BazelGenRuleRule.java | 17 ----------------- 2 files changed, 27 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRule.java index 70557d2f49eacc..d8d0394cb09483 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRule.java @@ -31,14 +31,4 @@ protected boolean isStampingEnabled(RuleContext ruleContext) { } return ruleContext.attributes().get("stamp", Type.BOOLEAN); } - - // TODO(https://github.com/bazelbuild/bazel/issues/19132): Remove this override once downstream - // projects are migrated. - @Override - protected CommandHelper.Builder commandHelperBuilder(RuleContext ruleContext) { - return CommandHelper.builder(ruleContext) - .addToolDependencies("tools") - .addToolDependencies("exec_tools") - .addToolDependencies("toolchains"); - } } diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java index 5055b89fa2f0a9..7055d77b46feb9 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/genrule/BazelGenRuleRule.java @@ -46,23 +46,6 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) .cfg(ExecutionTransitionFactory.createFactory()) .value(env.getToolsLabel(GENRULE_SETUP_LABEL))) - // TODO(https://github.com/bazelbuild/bazel/issues/19132): Remove this once downstream - // projects are migrated. - /* - Deprecated. Use tools instead. - -

- There was a period of time when exec_tools and tools behaved - differently, but they are now equivalent and the Blaze team will be migrating all uses of - exec_tools to tools. -

- */ - .add( - attr("exec_tools", LABEL_LIST) - .cfg(ExecutionTransitionFactory.createFactory()) - .allowedFileTypes(FileTypeSet.ANY_FILE) - .dontCheckConstraints()) - // TODO(bazel-team): stamping doesn't seem to work. Fix it or remove attribute. .add(attr("stamp", BOOLEAN).value(false)) .build();