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

After modifying the source file, the corresponding automatically generated class is not updated #309

Open
changchengqin opened this issue Aug 9, 2020 · 4 comments
Labels

Comments

@changchengqin
Copy link

Questions

After modifying the source file, the corresponding automatically generated class is not updated.

Version

4.0.0-milestone4

Context

while I used vertx to automatically generate classes such as VertxProxyHandler and VertxEBProxy, I encountered a problem, that is:
when I modify a certain service source code file, the IDE will automatically recompile it, but the corresponding VertxProxyHandler and VertxEBProxy classes have not been recompile.

After debugging, I found that it was caused by this line of code in the process method of the CodeGenProcessor class in the vertx-codgen class library.

image

As long as classes such as VertxProxyHandler are automatically generated once, unless the entire project is recompiled as a whole or the generated class is deleted, it will not be automatically generated in the future.

Do you have a reproducer?

https://github.com/changchengqin/codegen

Steps to reproduce

  1. clone above repo.
  2. build
  3. modify source file src/main/java/com/example/codegen/service/UserService.java
  4. recompile source file src/main/java/com/example/codegen/service/UserService.java

The normal expected result is that UserServiceVertxProxyHandler and UserServiceEBProxy should be updated accordingly, but the fact is not.

Extra

  • OS: Windows 10 Enterprise
  • JDK: 11 or later
  • IDE: Intellij IDEA Community 2019.3.1 or 2019.3.3 or 2019.3.4 or 2020.2
@vietj
Copy link
Member

vietj commented Oct 21, 2020

have you tried modifying this project to make it work ?

@changchengqin
Copy link
Author

Yes, I tried many times, including using the latest Vertx 4.0.0.beta3 version, the phenomenon still exists.

@vietj
Copy link
Member

vietj commented Oct 26, 2020

no I mean, have you tried patching vertx-codegen to make it work

@changchengqin
Copy link
Author

Hmm, yes, when I commented these three lines of code in the process method of the CodeGenProcessor class, everything returned to normal.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants