-
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 - improve injection point transformation API #38856
Comments
I would call the method When it comes to the transformer API, there are more options. We could introduce some way through which a transformer implementation would signal that they want
But it generally feels like mirroring |
I wouldn't because then a caller could expect the
We would need to deprecate |
I would expect most Quarkus developers to not even know about CDI's But we could call it The only downside is that most of the ArC API uses the word "target" as a name for this concept.
Agree. |
How about just |
That's reasonable. (One might ask what have annotations to do with any of this, but the return type of the method has been ( |
Well, we might also try |
Haha good idea! 😆 |
As part of #38841, we discovered that the API for injection point transformation is fairly hard to use when you need to alter IPs which are method parameters. As of now, you have to be aware that you operate on an
AnnotationTarget
with kindMETHOD
instead ofMETHOD_PARAMETER
and you need to alter annotations in a tedious way by supplying a different ann. target. That being said, it isn't broken per se, just hard to use properly.This seems to have been intentional as older Jandex API (pre 3.0) didn't allow easier handling - but that's no longer the case.
We should do something along the lines of:
MethodParameterInfo
intoInjectionPointInfo
#getTarget()
method as it would be confusing and breaking to silently change its behavior#getInjectedTarget()
which will now return ann. target of method param where applicableInjectionPointsTransformer
API#getTarget()
and we would like to change that. We might need to do the same thing as suggested above although that will end up being the only impl ofTransformationContext
which doesn't havegetTarget
method 🤷The text was updated successfully, but these errors were encountered: