diff options
author | 2015-05-12 15:43:00 +0000 | |
---|---|---|
committer | 2015-05-15 09:35:25 +0000 | |
commit | a7c9692dd14f0ee3e7a3b29f0602c2d8424b6bc8 (patch) | |
tree | 5c6f2f168e7d24460008efc378d7b7b1a266f1b5 | |
parent | 0cf1ac83811c0912a0fa51171100b748586d05de (diff) |
Remove left over code.
--
MOS_MIGRATED_REVID=93416921
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java index 10a567467a..a287b267e9 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java +++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java @@ -26,6 +26,7 @@ import static com.google.devtools.build.lib.syntax.SkylarkType.castList; import static com.google.devtools.build.lib.syntax.SkylarkType.castMap; import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; @@ -219,6 +220,7 @@ public class SkylarkRuleClassFunctions { FuncallExpression ast, Environment funcallEnv) throws EvalException, ConversionException { + Preconditions.checkState(funcallEnv instanceof SkylarkEnvironment); RuleClassType type = test ? RuleClassType.TEST : RuleClassType.NORMAL; // We'll set the name later, pass the empty string for now. @@ -243,11 +245,6 @@ public class SkylarkRuleClassFunctions { builder.setOutputsDefaultExecutable(); } - if (!(funcallEnv instanceof SkylarkEnvironment)) { - System.out.println("rule called from non-Skylark environment!"); - // throw new EvaluationException("rule not accessible at the toplevel"); - } - if (implicitOutputs != Environment.NONE) { if (implicitOutputs instanceof BaseFunction) { BaseFunction func = (BaseFunction) implicitOutputs; |