-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add constraint support #119
Conversation
GitHub actions is currently having an outage |
Good call. I started off with |
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'm generally good with this. I think a bit of explaining about the line number node manipulations would be helpful for future maintainers.
How reliable is the line-number manipulation across julia versions? I have a vague sense that it might uh not be the most reliable thing but I have nothing to back that up...
There's a test for it and I've found it to be quite reliable so far |
I'll be waiting until #123 is merged before merging this. |
#123 has been merged. I need to update the version here and finish some downstream testing I started. |
Adds basic constraint support for Legolas schemas so you can define constraints on the relationships between fields. Previously, this could be worked around by adding such logic into a field:
Unfortunately, the old approach would produce an extra
ArgumentError
which could create confusion. Additionally, when utilizing more complicated constructor logic forb
these kinds of constraints can be less clear than declaring them separately like so:Closes #69