-
Notifications
You must be signed in to change notification settings - Fork 1
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
Actually fix lemminx compilation #729
Actually fix lemminx compilation #729
Conversation
@testforstephen if you have some time, I would appreciate if you could review this change. I don't fully understand why the .class files were being generated in a temporary folder instead of the expected folder. When I debugged the JavaBuilder running with ECJ, the .class files for the source files were generated and placed in |
|
25bab9d
to
8b60d5f
Compare
- progress is currently hampered by eclipse-jdtls#729, I get a stacktrace that that PR should fix (classcast from within javac) Signed-off-by: David Thompson <davthomp@redhat.com>
Javac generates .class files in a temporary folder because the JDT builder API expects the compiler to return class bytes rather than writing the files directly. To meet this requirement, we work around the javac implementation by generating .class files in a temporary directory first, then return the bytes of the temp class file to the ImageBuilder via the CompilationResult. Once the upstream ImageBuilder accepts the CompilationResult, we will delete the temp Javac class files. You can find the full discussion history in #535 (comment). |
I tried lemminx project with Javac bits, it can generate classes and test-classes under target directory successfully. Could you clarify the specific issue you encountered that you intend to address with this PR? |
If you clean the project, (eg. delete all the .class files under |
Need to actually generate the `.class` files when building, since the `src/main/test` compilation needs the `.class` from `src/main/java` being present. Signed-off-by: David Thompson <davthomp@redhat.com>
8b60d5f
to
52feb1a
Compare
After deleting the |
Okay, I checked again, and compiling lemminx now works properly. Some of the changes in this PR were related to compiling modules properly; I'll check if they are still necessary and move them over to a new PR. |
Need to actually generate the
.class
files when building, since thesrc/main/test
compilation needs the.class
fromsrc/main/java
being present.