Skip to content
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

validatron rewrite: rules engine improvements #181

Merged
merged 13 commits into from May 19, 2023
Merged

Conversation

banditopazzo
Copy link
Member

@banditopazzo banditopazzo commented May 8, 2023

validatron rewrite: rules engine improvements

This pr is a complete rewrite of validatron crate with all derived changes.

Implementation (Optional)

  • Generalized validatron with a single trait instead of previously multiple traits (for struct and for enum)
  • Splitted the previous all-in-one field validation method in two components
    • a sort of reflection infrastructure
    • the validation process that leverage the previous point; this made possible to have dynamic field rules and better handle collection types
  • Moved the dsl from validatron to the rules engine, as it's specifically designed to work with our rules

I have

  • run cargo fmt;
  • run cargo clippy;
  • run cargo testand all tests pass;
  • linked to the originating issue (if applicable).

@banditopazzo banditopazzo marked this pull request as ready for review May 11, 2023 14:53
crates/validatron/derive/src/lib.rs Show resolved Hide resolved
crates/validatron/src/lib.rs Show resolved Hide resolved
crates/validatron/src/lib.rs Show resolved Hide resolved
crates/validatron/src/compiler.rs Outdated Show resolved Hide resolved
@MatteoNardi MatteoNardi self-requested a review May 19, 2023 16:10
@banditopazzo banditopazzo merged commit 98171e5 into main May 19, 2023
17 checks passed
@banditopazzo banditopazzo mentioned this pull request May 19, 2023
12 tasks
@banditopazzo banditopazzo deleted the validatron-ng branch June 6, 2023 08:39
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.

dsl: relative event fields as values
2 participants