-
Notifications
You must be signed in to change notification settings - Fork 188
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
Remove UnbannedReflectiveBuildItem + policy extension ? #699
Comments
We currently ban classes annotated with |
I'd say that we should trust a little extensions developers and thus evaluation should be done mainly through the PR review process. |
I'm not sure I understand, some classes annotated with |
Because on the camel side there were efforts to avoid reflection and there are multiple commits where this is visible on each component. It wasn't possible to do this on all the components btw, so I agree the build should not fail. |
I agree with @lburgazzoli, @oscerd |
I am sorry for the inconvenience, but I still think that registering a class for reflection that belongs to a well known group that is expected not to need it, should not go without checking it properly. Speaking for me, I do not feel able to eval during the review by pure sight whether some Camel class has some specific annotation. I think the policy does some useful work there. If we really want to tackle this, we should keep the policy. Going through tens of extensions manually afterwards to check whether we register for reflection only what is necessary is a lot of work, that I did twice and I would not wish anybody to that again. However, if we actually do not have the ambition to do this properly, I won't be against removing the policy. By no means this inconvenience can impact Camel Quarkus application developers unless they consciously depend on the policy extension. This is only the case in our integration tests. Failing is the right thing to do there because what does not fail the build gets ignored. |
As a compromise, can we not just log a message at |
I think the warning is the right thing as it also avoid to keep a list of white listed classes (that needs to be maintained) |
OK, accepting that the policy is not seen as useful by the majority and thus also switching to passive mode for the solving of the underlying problem. |
All the Camel components now do not use reflection when configuring themselves. We have those generated Configurer classes today. Today we fixed one (hopefully last) issue in the api components that @jamesnetherton discovered. Thats fixed in Camel 3.5 onwards (backported to 3.4.3 also) |
When a component uses the
camel-api-component-maven-plugin
(olingo4
,box
,fhir
,zendesk
etc...) one has to register the Configuration classes for reflection usingReflectiveClassBuildItem
.With the Policy extension, one also has to register the same classes with
UnbannedReflectiveBuildItem
or else the build fails.Since these are valid uses of
ReflectiveClassBuildItem
I really don't think the build should fail.The text was updated successfully, but these errors were encountered: