Skip to content

Runtime validation as fallback strategey - #1342

Merged
octonato merged 8 commits into
mainfrom
octonato/validation-ast-runtime
Feb 25, 2026
Merged

octonato merged 8 commits into
mainfrom
octonato/validation-ast-runtime

Conversation

@octonato

Copy link
Copy Markdown
Contributor

A while ago I refactored to the compile time validation to operate on an intermediate AST.

As such we can convert compile time (annotation processor AST) and runtime (java reflection model) to this intermediate AST and then run the validations.

This allow us to run the same validation at compile time and at runtime.

The runtime is strictly speaking not necessary because the compile time will catch errors first.

However, a shared component library that have been validated and packaged using a previous SDK version won't be re-validated at compile time. With this change, such pre-compiled components will get a second validation run, at runtime.

@octonato
octonato force-pushed the octonato/validation-ast-runtime branch from b2c9b3d to e7bc619 Compare February 25, 2026 09:55
@octonato
octonato force-pushed the octonato/validation-ast-runtime branch from dd1621d to ab80a0f Compare February 25, 2026 10:51

@johanandren johanandren left a comment

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.

LGTM

@Override
public String applyEvent(Event event) {
return "";
}

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.

What's the onEvent method above (in several other invalid-classes as well)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this is garbage. I will remove it.

@octonato
octonato merged commit 8b13091 into main Feb 25, 2026
34 checks passed
@octonato
octonato deleted the octonato/validation-ast-runtime branch February 25, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants