-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ArC - Warning about CDI Lite and bean discovery mode #31378
Comments
Otherwise it is not possible to know which dependency contain the problematic beans.xml. Related to quarkusio#31378.
First step is here: #31379 |
Good point, I didn't think we have that since up until now we just detected
Or change the warning to throwing an exception on a separate PR to let CI crash on the problematic bits :-) |
OK, the outcome is (better use a log than an exception to have everything in one go):
Now my question: can we safely change the value in these components? Because they are all used outside of the context of Quarkus so I'm not sure if it's something we can/should do. If we can't fix it or we expect other libraries to come with the same thing, I would recommend to make this message debug instead of warn. |
For the sake of Quarkus, you can safely change them to I am sure you know this but just for the sake of reader's clarity, the difference between It's mostly fairly easy to transition from
We should IMO fix our libraries and I don't expect that to be too difficult. |
Could you reach out to the authors of these libraries and provide recommendations? That would be @mmusgrov for Narayana LRA and @jmartisk for SmallRye GraphQL. The latter being the priority as I think it's more largely used. Thanks. |
Of course, I'll first take a look at those JARs myself to see what's in there and then continue that discussion via email :) |
The LRA client module only needs bean-discovery-mode "annotated" so I've raised https://issues.redhat.com/browse/JBTM-3756 and a pr to fix it. |
@mmusgrov oh, you beat me to it by few minutes :) |
@gsmet FYI this is now fixed in SR graphql and in narayana. Therefore, future releases of both libraries should make the warning go away. I assume we want to keep this issue open until we upgrade graphql and narayana versions. |
I get this warning now in my OmniFaces wrapper extension. OmniFaces configured its beans.xml this way intentionally as it's a utility library. Should I ask the author whether it should switch to annotated? |
If the library wishes to support CDI Lite, then annotated is required. |
@manovotn I wonder if we should have a build item so that extension authors can avoid the warnings for libraries that are known to be working. |
A build item that would carry the artifact coordinates makes sense to me (at least a lot more sense than a config flag for disabling the warning for good :-) ). I'll try to stitch something together. |
Here's a draft PR: #31856 @melloware could you please take a look? I believe it is self-explanatory and should cover your case well. |
That looks good to me and would handle my needs perfectly. |
I think we can close this one: we have a build item and SmallRye GraphQL has been upgraded in |
We don't have a build item yet, because my PR is still draft :-) I'll rebase and undraft in a bit though, so we should be good soon. |
I tried the build item: @BuildStep
void produceKnownCompatible(BuildProducer<KnownCompatibleBeanArchiveBuildItem> knownCompatibleProducer) {
// GitHub #62: bean discovery mode in beans.xml
knownCompatibleProducer.produce(new KnownCompatibleBeanArchiveBuildItem("org.omnifaces", "omnifaces"));
} But it does not work I still see this warning:
|
I just started one of my applications and I ended up with the following warning at startup:
The first step in improving the situation is to improve the warn message to include the artifact as with the current message, it's impossible to know which dependency is problematic (I don't have a
beans.xml
in my app, this is coming from a dependency).I already have a patch for it and will open a PR.
While I understand the rationale of it, we need to make sure that all our extensions are free of this or our users will all start seeing these warnings.
For instance, SmallRye GraphQL is problematic: https://github.com/smallrye/smallrye-graphql/blob/main/client/implementation/src/main/resources/META-INF/beans.xml .
And there might be others.
So we would need to go through the full CI log and check the occurrences of this message once the improved error message is merged.
The text was updated successfully, but these errors were encountered: