common-workflow-language / common-workflow-language/cwltool

better error message for `outputSource` extra element

Open
#1,357 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

``` cwl
outputs:
many_files:
type: File[]
outputSource:
source:
- step1/array1
- step2/array2
linkMerge: merge_flattened
```
```
ERROR Tool definition failed validation:
result_chunker_subwf.cwl:2:1: Object `result_chunker_subwf.cwl` is not valid because
tried `Workflow` but
result_chunker_subwf.cwl:17:1: the `outputs` field is not valid because
result_chunker_subwf.cwl:18:3: item is invalid because
result_chunker_subwf.cwl:20:5: the `outputSource` field is not valid because
value is a CommentedMap, expected null or string or array
of
```

I would suggest that when a single entry Map appears where no Map is valid, that the parser tries again to see if the contents of that solo value in the map otherwise parse; only for the purposes of giving a better error message

> result_chunker_subwf.cwl:20:5: the `outputSource` field is not valid because value is a Map, expected null or string or array of . The `outputSource` field is valid if the `source:` on line 21 is removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.