Suggestion: default: in CommandInputParameter should allow expressions

At the moment default on an CommandInputParameter is a static value. I encountered a case when updating the bwa-index.cwl tool where it would be very useful for this to be an expression, so that if the (optional) index_name parameter is not provided (thus it is null), the value from the input_file.nameroot is used instead. This could then set the value for this parameter when no user supplied value is provided.

Are there down sides to default not being allowed to being an expression?

P.S. should I start this discussion here or as a Github Issue on ?

Hello @pvanheus!

There’s an existing discussion on this at and it has been suggested for implementation for the next release of CWL.

We haven’t made the GitHub repo for that yet, but once that is done it would be a couple line schema change with a smallish update to cwltool to implement @tetron’s suggested order of evaluation.

Any contributions to further this are welcome!