From 5d41dbea25c6c9e3776516c7aa3598b8c153a410 Mon Sep 17 00:00:00 2001 From: dslomov Date: Fri, 22 Sep 2017 12:44:18 +0200 Subject: Automated rollback of commit 17214ac78ffaec369d5d5bafe62a39730473cfaa. *** Reason for rollback *** Rolled back commit enforces stricter parameter checks. Will fix and roll forward This creates several failures on the nightly build of Bazel: ERROR: /home/ci/workspace/Global/rules_closure-node=linux-x86_64/closure/protobuf/test/BUILD:23:1: no such package '@com_google_protobuf_protoc//': Cannot convert parameter 'url' to type string or sequence of strings, in method download_and_extract(List, string, string, string, string) of 'repository_ctx' and referenced by '//closure/protobuf/test:example_proto_gen'. ERROR: Analysis of target '//closure/protobuf/test:example_lib' failed; build aborted: no such package '@com_google_protobuf_protoc//': Cannot convert parameter 'url' to type string or sequence of strings, in method download_and_extract(List, string, string, string, string) of 'repository_ctx'. *** Original change description *** Check parameter types for methods when multiple types are allowed. Fixes #3714 RELNOTES: None. PiperOrigin-RevId: 169669802 --- .../build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/skylark') diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java index c4f5f5af30..f3371cc13a 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java @@ -298,8 +298,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase { public void testCreateSpawnActionArgumentsBadExecutable() throws Exception { checkErrorContains( createRuleContext("//foo:foo"), - "Cannot convert parameter 'executable' to type File or string, in method " - + "run(list inputs, list outputs, list arguments, int executable) of 'actions'", + "expected file or string for executable but got int instead", "ruleContext.actions.run(", " inputs = ruleContext.files.srcs,", " outputs = ruleContext.files.srcs,", @@ -625,7 +624,7 @@ public class SkylarkRuleImplementationFunctionsTest extends SkylarkTestCase { SkylarkRuleContext ruleContext = createRuleContext("//foo:foo"); checkErrorContains( ruleContext, - "Cannot convert parameter 'content' to type string or Args", + "Unexpected type: Integer", "ruleContext.actions.write(", " output = ruleContext.files.srcs[0],", " content = 1,", -- cgit v1.2.3