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

Clarify short-circuiting of &&, || and if/then/else expressions #199

Closed
cjllanwarne opened this issue Mar 9, 2018 · 4 comments
Closed

Comments

@cjllanwarne
Copy link
Contributor

cjllanwarne commented Mar 9, 2018

I think most people would expect this (broadinstitute/cromwell#3384) to work, but it's probably worth making that explicit in the SPEC.

Draft implementation: https://github.com/openwdl/wdl/tree/199-short-circuit

@patmagee
Copy link
Member

This does not work? I agree though, this should probably work out of the box and be an expected behaviour of all implemenations.

@cjllanwarne
Copy link
Contributor Author

@patmagee this was an oversight in Cromwell's implementation. I guess the fact that it lasted this long means it's a bit of an edge case but it's still worth sorting out.

This works as you'd expect now in Cromwell 31 (released a few days ago) and this is the corresponding "clarify the spec"

@patmagee
Copy link
Member

@cjllanwarne is this really a spec issue or an issue for the implementor? it seems natural to assume short-circuiting without having to define it explicitly anywhere. If you agree we can go ahead and close this

@cjllanwarne
Copy link
Contributor Author

I think the example in the description is a valid use case and an example of why we can't just leave it to the implementation (because if an implementation doesn't short-circuit, that workflow is a failure and if it does short circuit then it's a success).

Therefore, IMO it's more than just an optimization detail and deserves a one line addition to the spec guarantee the same behavior across implementations.

@jdidion jdidion added this to the 1.2 milestone Mar 23, 2023
@jdidion jdidion self-assigned this Mar 27, 2023
@jdidion jdidion modified the milestones: 1.2, 1.1.2 Feb 7, 2024
@jdidion jdidion closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants