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

decoder: Decouple each validator into its own type #297

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Aug 8, 2023

The goal of these changes are primarily to improve readability and composability of the logic, as we anticipate more rules to be added in the future and existing rules to become more complex as a result of schema extensions in #290

We may end up with two different interfaces for external validators, where in one case the validator reacts to various nodes in the AST and in the other case processes some higher level context, like collected references. So this new interface should be useful externally too at some point, but not for the reference-based validation rule we plan to implement as part of #288

It is possible that we'll need to either modify or re-implement MergeBlockBodySchemas as part of #291 but we will cross that bridge when we come to it.

@radeksimko radeksimko added enhancement New feature or request technical-debt labels Aug 8, 2023
@radeksimko radeksimko self-assigned this Aug 8, 2023
@radeksimko radeksimko marked this pull request as ready for review August 9, 2023 08:08
@radeksimko radeksimko requested a review from a team as a code owner August 9, 2023 08:08
@jpogran jpogran merged commit 07cfc94 into main Aug 9, 2023
4 checks passed
@jpogran jpogran deleted the f-diags-refactor-validators branch August 9, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants