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

Support the Eclipse Java Compiler #163

Closed
ascopes opened this issue Nov 22, 2022 · 5 comments
Closed

Support the Eclipse Java Compiler #163

ascopes opened this issue Nov 22, 2022 · 5 comments
Labels
help needed Looking for people with time/resources/knowledge to help out with this one new feature A new feature question Further information is requested

Comments

@ascopes
Copy link
Owner

ascopes commented Nov 22, 2022

Reconsider whether ECJ support is feasible. This was removed in #92 due to the development overhead for working around bugs in ECJ's JSR-199 compliance, but with some architectural changes in this library that have been added since that issue was closed, it may be feasible to consider supporting ECJ again.

@ascopes ascopes added question Further information is requested new feature A new feature help needed Looking for people with time/resources/knowledge to help out with this one labels Nov 22, 2022
@ascopes ascopes added this to the 1.0.0 milestone Nov 22, 2022
@ascopes ascopes self-assigned this Nov 22, 2022
@ascopes ascopes pinned this issue Nov 22, 2022
@ascopes ascopes added the large label Nov 24, 2022
@ascopes ascopes removed this from the 1.0.0 milestone Nov 26, 2022
@ascopes ascopes changed the title Reconsider ECJ support ECJ support Nov 26, 2022
@ascopes ascopes removed their assignment Nov 27, 2022
@ascopes ascopes unpinned this issue Jan 2, 2023
@ascopes ascopes pinned this issue Feb 2, 2023
@ascopes
Copy link
Owner Author

ascopes commented Apr 30, 2023

Blocked by eclipse-jdt/eclipse.jdt.core#958 which prevents modules being detected for custom JavaFileManager objects

@ascopes
Copy link
Owner Author

ascopes commented Jul 18, 2023

Per eclipse-jdt/eclipse.jdt.core#1153, it appears ECJ will no longer support Java 11, meaning any changes needed to fix outstanding issues and bugs we are seeing will not be supported on Java 11 if/when they are considered.

For now, I am going to close this issue as not planned, along with the PR to implement ECJ support.

@ascopes ascopes closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2023
@ascopes ascopes changed the title ECJ support Support the Eclipse Compiler Jul 18, 2023
@ascopes ascopes changed the title Support the Eclipse Compiler Support the Eclipse Java Compiler Jul 18, 2023
@agentgt
Copy link

agentgt commented Sep 5, 2023

@ascopes Eclipse file manager is not the only one that has bizarre behavior. Gradle incremental does unusual things as well and coincidentally slightly similar has problems with modules: jstachio/jstachio#223 albeit not the same problem.

I have been meaning to try to use a framework such as yours on my project but because most of the bugs have been integration (Eclipse, Maven, Gradle, Intellij etc) I blackbox generate code to the filesystem (then check it in which is kind of messed up but those tests do not change much).

@ascopes
Copy link
Owner Author

ascopes commented Sep 6, 2023

@agentgt yeah, it is a bit of a pain point.

So far, we appear to be fully compatible with how maven-compiler-plugin exposes file management under javac.

ECJ has been a bit of a nightmare to integrate with as ECJ appears to have several issues regarding modules if you do not use their custom file manager implementation. I've spent several hours trying to find a workaround but in the end the only solution would be maintaining a fixed fork. Some of the issue as well is that ECJ doesn't consistently use the file manager interfaces, sometimes falling back to just using java.io.File directly, which is a fairly big issue as you lose the ability to control the file system being run on.

I haven't fully tested Gradle integration, but this is definitely something I'd like to see included in this library as a test pack.

Since file management in this library uses a scratch-written implementation, we have the ability to fully control exactly how it works and tune it to whatever is needed.

If there is anything missing that you think would be useful for clearing up some of those concerns you mentioned, I am more than happy to discuss it!

@ascopes
Copy link
Owner Author

ascopes commented Dec 27, 2024

@agentgt just a small FYI. Eclipse have picked up the issues I've raised with them and are looking into the fixes required on their side. I've got a provisional branch up at GH-773 that plans to include ECJ in v5.0.0 of this library if we can get all tests passing. It is still not confirmed yet but just thought it was worth pinging you an update 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help needed Looking for people with time/resources/knowledge to help out with this one new feature A new feature question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants