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

Having some challenge with I18NProviders and @VaadinServiceScoped #147

Open
ckosmowski opened this issue Feb 12, 2024 · 1 comment
Open
Labels
bug Something isn't working documentation Improvements or additions to documentation Impact: Low Severity: Major

Comments

@ckosmowski
Copy link

I was challenged with instantiating a custom I18NProviders. I used the docs found at the vaadin page and tried to use CDI to instantiate a bean. That bean however got removed by quarkus during bean removal:

https://quarkus.io/guides/cdi-reference#remove_unused_beans

so no I18NProvider was found.

I needed to use the bean at an injection point for quarkus to stop removing the bean or use @unremovable to mark it. (Both seems missing in the docs).

In addition i had to add the @default qualifier for the QuarkusInstatiator to pick up the bean correctly (which is also not mentioned in the docs).

I got some help from the quarkus project here:

quarkusio/quarkus#38726

Maybe the docs can be updated or that beans should be made @unremovable and @default by default?

@mcollovati mcollovati added bug Something isn't working Severity: Major Impact: Low documentation Improvements or additions to documentation labels Feb 12, 2024
@mcollovati mcollovati moved this to 🔖 Normal Priority (P2) in Vaadin Flow bugs & maintenance (Vaadin 10+) Feb 12, 2024
@mcollovati
Copy link
Contributor

Thanks for the issue. Indeed, all @VaadinServiceEnabled beans should be discovered and marked as unremovable (UnremovableBeanBuildItem).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation Impact: Low Severity: Major
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

2 participants