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

feat: filterable class scanning of JAR #19299

Merged
merged 10 commits into from
May 6, 2024
Merged

Conversation

tltv
Copy link
Member

@tltv tltv commented May 2, 2024

This change improves optimization of class scanning of VaadinServletContextInitializer by reading optional configuration file within a JAR dependency. Configuration file is a regular properties file that can contain vaadin.allowed-packages or vaadin.blocked-packages to exclude/include packages being scanned by VaadinServletContextInitializer. Package exclusion/inclusion effects only classes in the JAR/module where META-INF/VAADIN/package.properties is located at.

Notice that this is only affecting the performance of the class scanning of Vaadin specific annotations and types and this feature is not meant to be used for excluding packages from the whole application. E.g. excluding VaadinServiceInitListener in a Spring application is not stopping Spring and Vaadin initializing it anyway, although some time-consuming actions like DevModeServletContextListener would still exclude it for optimization.

Fixes: #19117

tltv added 3 commits May 2, 2024 17:24
This change improves optimization of class scanning of `VaadinServletContextInitializer` by reading optional configuration file within a JAR dependency. Configuration file is a regular properties file that can contain `vaadin.allowed-packages` or `vaadin.blocked-packages` to exclude/include packages being scanned by `VaadinServletContextInitializer`. Package exclusion/inclusion effects only classes in the JAR/module where `META-INF/VAADIN/package.properties` is located at.

Notice that this is only affecting the performance of the class scanning of Vaadin specific annotations and types and this feature is not meant to be used for excluding packages from the whole application. E.g. excluding `VaadinServiceInitListener` in a Spring application is not stopping Spring and Vaadin initializing it anyway, although some time-consuming actions like `DevModeServletContextListener` would still exclude it for optimization.

Fixes: #19117
Copy link

github-actions bot commented May 2, 2024

Test Results

1 100 files  + 1  1 100 suites  +1   1h 21m 18s ⏱️ -30s
7 012 tests + 3  6 963 ✅ + 4  49 💤 ±0  0 ❌ ±0 
7 386 runs  +10  7 325 ✅ +11  61 💤 ±0  0 ❌ ±0 

Results for commit dd2b9e0. ± Comparison against base commit 2f08856.

♻️ This comment has been updated with latest results.

@tltv tltv marked this pull request as ready for review May 3, 2024 07:47
Copy link

sonarcloud bot commented May 6, 2024

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@tltv tltv merged commit 2bdf3e0 into main May 6, 2024
26 checks passed
@tltv tltv deleted the feat/19117-jar-package-filtering branch May 6, 2024 10:20
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable class scanning filters for JAR packages
3 participants