-
Notifications
You must be signed in to change notification settings - Fork 55
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
TYPE_USE
annotations were being ignored
#115
Conversation
Java's DAG for annotations processors doesn't contain `TYPE_USE` annotations on the Element for some reason. However, they are on the type. So, use the type instead. Note due to limitations of JavaPoet this doesn't fix `TYPE_USE` annotations on parameterized types or array components. If we want to address those we will need changes in JavaPoet which has been dormant for a very long time. Fixes #113 Relates to #111
d3e276e
to
b7eef30
Compare
FYI - for the standard
|
For
|
I’ll have a look Monday. Sorry I was sick the last few days. |
@Randgalt it looks right. I have not pulled the code yet and tested things like arrays and inner classes but it looks correct. Even if it doesn't handle those cases yet this looks like the correct behavior of propagating the type annotations. BTW you might want to test and or be careful with the Eclipse compiler annotation processor. IIRC it has an issue where it will propagate Anyway Google Auto Value is one of the few projects I know that does deal with TYPE_USE annotations correctly (and now this project will as well 😄 ) and they have issues with Eclipse (see):
I'm not saying you need to deal with it but just be aware of it. |
Java's DAG for annotations processors doesn't contain
TYPE_USE
annotationson the Element for some reason. However, they are on the type. So, use the
type instead.
Note due to limitations of JavaPoet this doesn't fix
TYPE_USE
annotations onparameterized types or array components. If we want to address those we will need
changes in JavaPoet which has been dormant for a very long time.
Fixes #113
Relates to #111