-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: range-constraint and lenght-constraint work with only one bound #548
Conversation
libs/execution/src/lib/constraints/executors/length-constraint-executor.ts
Outdated
Show resolved
Hide resolved
libs/execution/src/lib/constraints/executors/range-constraint-executor.ts
Outdated
Show resolved
Hide resolved
77f4594
to
5972412
Compare
5972412
to
eab0e5f
Compare
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.
Thanks for the fix and great that you also expanded it to other constraint types, well done 🥳 . I think the approach taken is not the perfect one though, I left a comment on the execution-context
towards that.
As always, I could be wrong so if there is a reason why you chose to not go the default value route let me know, otherwise I think it would be better to approach it like that.
libs/language-server/src/lib/validation/checks/constrainttype-specific/property-body.ts
Outdated
Show resolved
Hide resolved
libs/execution/test/assets/length-constraint-executor/lower-limit-missing.jv
Outdated
Show resolved
Hide resolved
libs/execution/src/lib/constraints/executors/length-constraint-executor.spec.ts
Outdated
Show resolved
Hide resolved
eab0e5f
to
0f6fcc6
Compare
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.
I might be missing something but there are no functional changes in this PR, only tests and hints now? Did you merge the functional changes in a different PR?
} | ||
|
||
block TestProperty oftype TestProperty { | ||
valuetypeAssignmentProperty: "test" oftype ConstraintType; |
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.
valuetypeAssignmentProperty: "test" oftype ConstraintType; | |
valuetypeAssignmentProperty: "test" oftype TestValueType; |
Not sure how this model even compiles?! 🤔 Same for the other model.
0f6fcc6
to
dbf3670
Compare
dbf3670
to
dfb9f3c
Compare
It seems to work without functional changes. I think this is because all the required properties like |
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.
Sounds good, then we have hardened Jayvee for the future with more tests :). For future reference, if you'd like me to review again please always click the re-request review button though.
It is now possible to only specify one bound when using
lenght-constraint
. However one bound minimum is still requiredcloses #533
I went ahead and took the liberty to also implement this fix for
range-constraint
.