Open peterhuene opened 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
.
Currently the type coercion table does not list a supported type coercion from
File
toString
, onlyString
toFile
.There are also conflicting examples in the spec regarding a
File
toString
type coercion:coercion_fail.wdl
which explicitly saysFile
does not coerce toString
in a call to thecontains
function and thus is an error.change_extension_task.wdl
which explicitly shows a call tosub
with aFile
argument, despite the type ofsub
being[String, String, String] -> String
.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 fromFile
toString
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 alsoDirectory
) toString
intended to be accepted in the current WDL spec? If so, we should include it in the coercion table and correct thecoercion_fail.wdl
example.If not, we should fix the
change_extension_task.wdl
example.