You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
coercion_fail.wdl which explicitly says File does not coerce to String in a call to the contains function and thus is an error.
change_extension_task.wdl which explicitly shows a call to sub with a File argument, despite the type of sub 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 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.
The text was updated successfully, but these errors were encountered:
peterhuene
changed the title
Clarification: File to String type coercion.
Clarification: is File to String type coercion supported?
Sep 25, 2024
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.The text was updated successfully, but these errors were encountered: