-
Notifications
You must be signed in to change notification settings - Fork 9
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
if...then...else
type checks in command
blocks
#318
Comments
Provided it is easy to implement, it seems like a good thing to do. WDL tends to treat types that can be coerced as more of an implicit action anyway, so it feels in line with what the intention is there. |
I don't think this can be changed as the Static analysis should not treat the type production of an expression differently depending on where the expression is encountered in the AST, either. If you want to remove the nested interpolation, how about this expression instead? ~{
if (length(read_two_fastqs_gz) != 0)
then clip_3p_adapter_mmp.right
else None
} The type of this expression is |
FWIW, Here's the relevant part of the spec:
|
In the workflow repo, we have a block of WDL code in a command block like this:
Stylistically, we want to drop the
"~{}"
wrapper from thethen
arm of the conditional. However,sprocket
warns that thethen
andelse
arms return different types (float
andstring
), specificallytype mismatch: expected type
Float, but found type
String``. Since there is no further expression and the result of this conditional is returned into thecommand
block which is interpolated to `string`, is this a check that could be relaxed?The text was updated successfully, but these errors were encountered: