-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Re-name and Extend Run Conditions API #13784
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add and_then
and or_else
back, marking them as deprecated and calling the renamed methods in them? That will make migrations a bit easier for users and we can remove it right after it gets into a release.
I much prefer these names though, and the other logical combinations are useful enough.
Yes - will do |
Co-authored-by: Andres O. Vela <andresovela@users.noreply.github.com>
I don't think we should rename these. The |
While that's an important fact about how these work, I don't think this naming convention was doing a good job conveying this information to users. As evidenced by the fact that users regularly asked "why is it called IMO we should use clear, simple names, and explain this behavior better in documentation and other learning material. |
Objective
Solution
Renames the
and_then
/or_else
run condition methods toand
/or
, respectively.Extends the run conditions API to include a suite of binary logical operators:
and
or
nand
nor
xor
xnor
Testing
Did you test these changes? If so, how?
Are there any parts that need more testing?
true
== combinator output orfalse
== combinator output .How can other people (reviewers) test your changes? Is there anything specific they need to know?
&&
,||
,^
,!
).If relevant, what platforms did you test these changes on, and are there any important ones you can't test?
Changelog
What changed as a result of this PR?
If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings
and_then
run condition combinator renamed to simplyand
or_else
run condition combinator renamed to simplyor
nand
run condition combinator.nor
run condition combinator.xor
run condition combinator.xnor
run condition combinator.Migration Guide
and_then
run condition method has been replaced with theand
run condition method.or_else
run condition method has been replaced with theor
run condition method.