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

Add an "extended validation" mode, where every framework annotation is queried and checked for valid usage #18

Open
Jeffset opened this issue Jan 23, 2023 · 0 comments
Labels
enhancement New feature or request priority:minor Issue with minor priority.

Comments

@Jeffset
Copy link
Collaborator

Jeffset commented Jan 23, 2023

Currently, one can use any framework annotation in any place where annotation target allows, but this "odd" usages are not validated by the framework. For example, if one uses @Conditional on a class without an inject constructor or on a builder input, or anywhere else, Yatagan won't complain, it will simply ignore such usages, because it never queries anything besides @Component annotation.

Querying all the framework annotations to validate their usage is a prudent thing to do, yet it can penalize code generation performance and build "incrementality".

The solution would be to introduce an annotation processing option, specific to the codegen backends, that enables such extensive validation. Such option can be enabled in environments less sensitive to build performance and incremental rebuilds, like CI checks.

@Jeffset Jeffset added enhancement New feature or request priority:minor Issue with minor priority. labels Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:minor Issue with minor priority.
Projects
None yet
Development

No branches or pull requests

1 participant