Skip to content

Conversation

@lijiayong
Copy link
Contributor

@lijiayong lijiayong commented Jun 21, 2017

This is a fix to the following bug when the source has linkMerge and sink is "Any". For example,

echo.cwl

cwlVersion: v1.0
class: CommandLineTool
baseCommand: echo
inputs:
  echo_in:
    type: Any
    inputBinding: {}
outputs: []

echo-wf.cwl

class: Workflow
cwlVersion: v1.0
requirements:
  MultipleInputFeatureRequirement: {}
inputs:
  letters0:
    type: string
    default: "a0"
  letters1:
    type: string[]
    default: ["a1", "b1"]

outputs: []

steps:
  echo:
    run: echo.cwl
    in:
      echo_in:
        source: [letters0, letters1]
        linkMerge: merge_nested
    out: []

Executing the workflow gives the following error.

$ cwltool echo-wf.cwl 
/home/jiayong/anaconda2/bin/cwltool 1.0.20170616035942
Resolved 'echo-wf.cwl' to 'file:///home/jiayong/Code/work_scripts/cwl/test/echo_any/echo-wf.cwl'
Tool definition failed validation:
echo-wf.cwl:7:5: Source 'letters0' of type "string" is incompatible
echo-wf.cwl:19:7:   with sink 'echo_in' of type "Any"
echo-wf.cwl:19:7:   sink has linkMerge method merge_nested
echo-wf.cwl:10:5: Source 'letters1' of type {"type": "array", "items": "string"} is incompatible
echo-wf.cwl:19:7:   with sink 'echo_in' of type "Any"
echo-wf.cwl:19:7:   sink has linkMerge method merge_nested

@cwl-bot
Copy link

cwl-bot commented Jun 21, 2017

Can one of the admins verify this patch?

@lijiayong lijiayong changed the title Fix check_types when sinktype is Any and add tests 10827 static checker fix Jun 21, 2017
@mr-c
Copy link
Member

mr-c commented Jun 21, 2017

Jenkins, add to test list

@mr-c
Copy link
Member

mr-c commented Jun 21, 2017

Jenkins, add to testlist

@tetron
Copy link
Member

tetron commented Jun 22, 2017

Can you take a look at the bug demonstrated here? common-workflow-language/common-workflow-language#462

@lijiayong
Copy link
Contributor Author

Sure, looking

@tetron
Copy link
Member

tetron commented Jun 22, 2017

See also #437

@lijiayong
Copy link
Contributor Author

lijiayong commented Jun 22, 2017

I think this fixes issue #437.

@tetron tetron merged commit c5175f4 into common-workflow-language:master Jul 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants