openwdl / wdl

Workflow Description Language - Specification and Implementations
https://www.openwdl.org/
BSD 3-Clause "New" or "Revised" License
778 stars 307 forks source link

Clarification: is `File` to `String` type coercion supported? #685

Open peterhuene opened 2 months ago

peterhuene commented 2 months ago

Currently the type coercion table does not list a supported type coercion from File to String, only String to File.

There are also conflicting examples in the spec regarding a File to String type coercion:

In an attempt to be faithful to the spec, sprocket is implementing full static analysis (and soon evaluation) of WDL and does not allow a coercion from File to String as it isn't in the coercion table; this is producing errors in existing WDL source that is accepted by Cromwell.

Is a coercion from File (and also Directory) to String intended to be accepted in the current WDL spec? If so, we should include it in the coercion table and correct the coercion_fail.wdl example.

If not, we should fix the change_extension_task.wdl example.

peterhuene commented 2 months ago

So I just noticed that the 1.0 spec allowed a coercion from File to String which appears to have been dropped in 1.1 and then continued to be unsupported in 1.2.

Was this an intentional breaking change? I didn't see it called out in the CHANGELOG for 1.1.

If so, I can add support for the coercion for 1.0 documents to sprocket.