wdl icon indicating copy to clipboard operation
wdl copied to clipboard

Clarify which task elements and workflows are singular and which can be specified multiple times.

Open claymcleod opened this issue 1 year ago • 2 comments

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:

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_metasection, or a meta section. As such, it follows that these elements can be defined multiple times.

claymcleod avatar Dec 07 '23 21:12 claymcleod

@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

patmagee avatar Dec 15 '23 15:12 patmagee

Agree with Patrick - this is true at least for the ANTLR parser. But I support adding clarification to the spec.

jdidion avatar Dec 15 '23 16:12 jdidion