Skip to content

smithy-rules-engine cleanups#1681

Merged
kstich merged 5 commits intosmithy-lang:mainfrom
rcoh:rules-cleanup
Apr 6, 2023
Merged

smithy-rules-engine cleanups#1681
kstich merged 5 commits intosmithy-lang:mainfrom
rcoh:rules-cleanup

Conversation

@rcoh
Copy link
Copy Markdown
Contributor

@rcoh rcoh commented Mar 15, 2023

Description of changes:
See individual commits:

  1. Expose functions to make ruleEvaluator more flexible to support coverage checking
  2. Fix bugs in constructors for boolEquals and stringEquals

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rcoh rcoh requested a review from a team as a code owner March 15, 2023 18:38
A copy-paste error in built in function construction functions meant that the JVM class was incorrect. This produces unexpected results when visitors are invoked because the wrong visitor branch will be called. This doesn't happen in general because `fromNode` produces the correct behavior.
@rcoh rcoh changed the title Rules cleanup smithy-rules-engine cleanups Mar 15, 2023
@@ -49,7 +49,7 @@ public StringEquals(FunctionNode functionNode) {
* @return a function instance representing the StringEquals comparison.
*/
public static Function ofExpressions(Expression left, Expression right) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Function be more specifically a StringEquals?

@kstich kstich merged commit cbe14b3 into smithy-lang:main Apr 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants