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

Attempt to recreate a file for type #221

Closed
slinkydeveloper opened this issue Nov 20, 2018 · 4 comments
Closed

Attempt to recreate a file for type #221

slinkydeveloper opened this issue Nov 20, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented Nov 20, 2018

I'm trying a project setup with vertx-codegen for @DataObject, vertx-service-proxy for @ProxyGen and vertx-web-api-service for @WebApiServiceGen and during compiling I get the following error:

Could not generate element for io.slinkydeveloper.debtsmanager.models.AuthCredentials: Attempt to recreate a file for type io.slinkydeveloper.debtsmanager.models.AuthCredentialsConverter

I import all three deps as processor

Tested with openjdk 8/9/11

@slinkydeveloper slinkydeveloper added this to the 3.6.0 milestone Nov 20, 2018
@slinkydeveloper
Copy link
Member Author

@slinkydeveloper slinkydeveloper commented Nov 20, 2018

After some investigation I found that during compilation code generation maven executes both CodegenProcessor and WebApiServiceGenProcessor (the class that extends CodegenProcessor). Both generate code and when WebApiServiceGenProcessor tries to write the code the code generation step fails

@slinkydeveloper
Copy link
Member Author

@slinkydeveloper slinkydeveloper commented Nov 20, 2018

Ok so after more investigation I have a clear view on it. When you load two or three annotation processors, the jvm compare processors each other. WebApiServiceGenProcessor overrides Set<String> getSupportedAnnotationTypes() and jvm triggers code generation in both classes.

slinkydeveloper added a commit to vert-x3/vertx-web that referenced this issue Nov 20, 2018
Signed-off-by: francesco <francescoguard@gmail.com>
@slinkydeveloper
Copy link
Member Author

@slinkydeveloper slinkydeveloper commented Nov 20, 2018

slinkydeveloper added a commit to vert-x3/vertx-web that referenced this issue Nov 21, 2018
Signed-off-by: francesco <francescoguard@gmail.com>
@vietj vietj modified the milestones: 3.6.0, 4.0.0 Nov 29, 2018
@vietj
Copy link
Contributor

@vietj vietj commented Nov 29, 2018

I think that was resolved with the usage of a single generator

@vietj vietj closed this Nov 29, 2018
@pmlopes pmlopes removed the to review label Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.