wdl
wdl copied to clipboard
Clarify which task elements and workflows are singular and which can be specified multiple times.
There a quite few workflow and task elements that the specification appears to imply can only occur once but that the grammar allows multiple occurrences.
For example, take a look at the task elements:
- An input section appears to be referred to as a singular section.
- A private declaration appears to allow zero or more declarations.
- A command section appears to be referred to as a singular section.
- An output section appears to be referred to as a singular section.
- A runtime section appears to be referred to as a singular section.
- Both metadata and parameter metadata sections appear to be referred to a singular, respectively.
For what it's worth, every example I have seen appears to follow the above conventions.
Contrast that with the parser implementation, which I interpret as (paraphrasing): a task can contain one or more task elements. A task element is defined as a task_input
section, a task_output
section, a task_command
section, a task_runtime
section, a bound_decls
section, a parameter_meta
section, or a meta
section. As such, it follows that these elements can be defined multiple times.
@claymcleod this is a general limitation of the grammars/parsers. We did not want to enforce strict ordering of task/workflow elements which would be required to use the grammar to enforce a single occurrence
- Only one input block is allowed in a workflow / task and it can happen anywhere in task.
- Any number of private declarations are allowed, but you cannot have two of the same declarations
- Only one command block is allowed
- Only one outputs section is allowed per workflow/task
- Only one runtime Sections is allowed
- Only one meta/parmeter-meta is allowed per workflow/task
Agree with Patrick - this is true at least for the ANTLR parser. But I support adding clarification to the spec.