Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
peterhuene opened this issue Sep 25, 2024 · 1 comment
Open

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

peterhuene opened this issue Sep 25, 2024 · 1 comment

Comments

@peterhuene
Copy link
Contributor

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.

@peterhuene peterhuene changed the title Clarification: File to String type coercion. Clarification: is File to String type coercion supported? Sep 25, 2024
@peterhuene
Copy link
Contributor Author

peterhuene commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant