-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Conditionals #4
Conditionals #4
Conversation
This puts the basic validations and error conditons through it's paces
…l-v1.2 into conditionals
This has been moved over from the old CWL repository. The history has been discarded.
The following conversation has been copied over from the original PR at common-workflow-language/common-workflow-language#862 |
@jmchilton on Oct 17, 2019 Thanks for laying this all out - I think the document is super useful and I appreciate all the effort. I think what is here makes some good conceptual sense outside the context of scatter/merge. I'm nervous about thinking through scatter/merge - but that is probably a deficiency with my ability to keep everything in my head. That said, if this included an explicit discussion of scatter and merging and how things work out with examples that would be really helpful. |
@jmchilton on Oct 18, 2019 I've slept on this and I've decided this should be simpler and more general.
This feels right - I like this! Given this I don't think we really should distinguish between a skipped output defaulted to null and an explicit null output. My argument here is essentially "who cares?" - my default position is this is complexity neither the user nor the implementer really needs. If we don't need it, lets try without it. One of the design goals with this was to avoid thinking about state - we aren’t exposing a ‘skipped’ states in CWL documents or to CWL authors at all. This again was good, and I think my proposal here to eliminate the concept of branch selection and replace it with just dispatching on nulls goes farther in that direction. We are eliminating ideas we expose to the user I think - they don’t really need to think about whether a previous step was skipped or just null. This reduces the cognitive load. And if 99.98% of the time CWL authors won’t care about the distinction between an explicit null and a skipped implicit null (my opinion), we should eliminate the cognitive load and implementation complexity associated with it. In addition to simplifying this for implementers and users, I think the result is constructs that are more general and reusable. This is good. For instance:
becomes:
I think this name is more clear and that feels to me like evidence the cognitive load is smaller. This also becomes a more general purpose tool that has uses outside of conditionals. We could implement optional exclusive parameters more cleanly using this, dispatching on filtered arrays, etc.. We’re finally taking steps down the road toward replacing common expressions with small utility patterns. Another benefit of this new approach here is Update: Talked with @tetron and @kaushik-work a bit more about this - a few notes.
|
@kaushik-work on Oct 18, 2019 I like the idea of stripping away as much as possible. |
@stain on Oct 21, 2019 I also like this late edition from @jmchilton - it is very important to state that it is We found it was was easy for users to get multiple conditionals wrong - e.g. they would have two steps, one with Add multiple inputs to evaluate and it's not easy to see the conditionals that can trigger at same time. So the name is important - I think we want to have in pre-defined order as an important requirement here. Now back to the proposal from @jmchilton : If someone really wanted the ability to return null that would not trigger fallover, they can change their types to Actually I think this is an advantage, as it means the step itself can decide to fail, even after its execution, e.g. a It does mean unnecessary execution of the additional upstream fallback steps (we have not in the spec said that an engine is free to not execute steps that do not contribute to |
@kaushik-work on Oct 29, 2019 @jmchilton , @stain, @tetron @mr-c I've been thinking about the syntax:
And now it is stuck in my head that this operator is really of the same kind as the I'd like to go back to the earlier syntax, which was congruent with how we had
A future extension can have In terms of operator precedence, we have well defined rules and they are (including this proposal)
|
I'm going to go ahead and merge this. |
Additions to specification and conformance tests for conditionals feature.