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

vaadin.whitelisted-packages breaks LitRenderer #1008

Closed
Frettman opened this issue Jan 30, 2022 · 1 comment · Fixed by #1009
Closed

vaadin.whitelisted-packages breaks LitRenderer #1008

Frettman opened this issue Jan 30, 2022 · 1 comment · Fixed by #1009

Comments

@Frettman
Copy link

Any non-trivial Spring Boot application seems to require vaadin.whitelisted-packages to be set, otherwise the application start takes much too long, at least in dev mode.
But when I set the whitelist to the root package of my application, there seem to be some built-in parts of Vaadin that break. More specifically I experience this for the com.vaadin.flow.data.renderer.LitRenderer. I can find lit-renderer.ts in target/flow-frontend but it does not seem to get loaded: window.Vaadin.setLitRenderer is not a function.
When I remove the whitelist and restart the application it starts working again.
Adding com.vaadin to the whitelist also seems to do the trick. But I was under the impression this shouldn't be necessary? At least there doesn't seem to be any mention of this anywhere.

As I have mentioned in #620, I would really appreciate a mechanism that allows add-ons to automatically contribute packages that they need to have scanned. This would make having to micromanage vaadin.whitelisted-packages obsolete in the first place.

caalador added a commit that referenced this issue Jan 31, 2022
add the renderer package to also
be scanned always as LitRenderer
uses an annotation.

Fixes #1008
@caalador
Copy link
Contributor

The default scanned packages for a whitelist always include the package of Component (com.vaadin.flow.component), Theme (com.vaadin.flow.theme) and com.vaadin.shrinkwrap as those have been the only places with annotations to take into account as renderers have not used any annotations.

Seems this changed in 22.0.0.alpha2 when LitRenderer was added.

joheriks pushed a commit that referenced this issue Jan 31, 2022
add the renderer package to also
be scanned always as LitRenderer
uses an annotation.

Fixes #1008
vaadin-bot pushed a commit that referenced this issue Jan 31, 2022
add the renderer package to also
be scanned always as LitRenderer
uses an annotation.

Fixes #1008
joheriks pushed a commit that referenced this issue Feb 2, 2022
add the renderer package to also
be scanned always as LitRenderer
uses an annotation.

Fixes #1008
manolo pushed a commit to vaadin/flow that referenced this issue Feb 8, 2022
vaadin/spring#1009

add the renderer package to also
be scanned always as LitRenderer
uses an annotation.

Fixes: vaadin/spring#1008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants