Home » Language IDEs » Java Development Tools (JDT) » Support official javac(Since Java is going to release often, the risk is that Eclipse will be in a permanent state of lag)
Support official javac [message #1783847] |
Mon, 19 March 2018 10:45 |
Tom Eugelink Messages: 825 Registered: July 2009 |
Senior Member |
|
|
Eclipse has been using it own compiler for since ever, and I understand the reason why. But it also is a nuisance, at least to me, because it makes Eclipse lag behind the official Java release. For example; writing Java 9 code still is not working completely flawlessly. And because I've got the users of my open source project in my neck on a Java 9 compatible release, these are the times I must switch to another IDE. And I don't like IntelliJ or NetBeans.
Now, with Java's long release cycles Eclipse had the time to catch up, so most of the time the IDE was working fine. But since Java is going to release every 6 months, I fear Eclipse will almost permanently be in state of lag.
How difficult would it be to start using the official javac?
Yes, I know this will limit the run-with-errors... I would be totally ok with that, I seldom use that anyway; errors need to be fixed. Maybe as a intermediate solution, when the source fails to compile, it would be possible to generate a stub class with with the same outward interface, but all methods throwing a "compilation exception".
Being able to use Eclipse with the "cutting edge" features of Java would be really nice.
|
|
|
Re: Support official javac [message #1783886 is a reply to message #1783847] |
Tue, 20 March 2018 00:42 |
Stephan Herrmann Messages: 1853 Registered: July 2009 |
Senior Member |
|
|
In case you speak for a company that's prepared to invest many person years into the development of this: let's talk :)
Let me check, if my observation over the last years matches to what you are seeing:
When we implemented Java 8 support in JDT, we received lots of bug reports with actionable examples and test cases. Given those reports and a very detailed specification of the new features (as updates to JLS) ecj was quickly up to speed for compiling Java 8 programs (for corner cases ecj may still give different results from javac, but it's an open question which compiler is closer to JLS, actually).
By comparison, during the preparation for Java 9, the number of incoming bug reports was quite low. I would even dare say, that the peek of Java 9 specific bug reports against JDT already lies behind us. This doesn't say the support is "flawless".
Two things to consider:
(1) No Java compiler is flawless. :)
(2) A (mostly) correct Java 9 compiler doesn't suffice for building Java 9 software. Much more than any prior version of Java, version 9 requires the cooperation of several tools. The reason is that compiling and running Java 9 software requires to tweak a lot of new bells and whistles to squeeze legacy software into the new rules of modularity. Have a look at JEP 261, to see what I mean. And these are not options for a few rare corner cases, but currently every real world application seems to need a mouthful of those new options. However, since Java 9 does not define a new build system, the new options must be provided by your favorite build tool.
If you face blocking problems with Java 9 support in recent milestone builds of JDT (you spoke of cutting edge, didn't you?), my guess is that a majority of issues is rooted in the cooperation of JDT and m2e. Regardless of whether or not that is the case, do you want to show us the bugs that effect you most?
For the future, I'd imagine that the problem may shrink, for the simple reason that Java releases will be of a more incremental nature than the revolution that Java 9 was.
Speaking of the future: have you tried the soon-to-be-released support for Java 10? We need your feedback / bug reports :)
cheers,
Stephan
PS: Ah, and ecj is more than just about compiling code with errors, it's a centerpiece in the architecture of the entire Eclipse IDE for Java. There are more reasons, still, why a second implementation of a language specification is vital for the community.
|
|
|
Re: Support official javac [message #1783896 is a reply to message #1783886] |
Tue, 20 March 2018 07:02 |
Tom Eugelink Messages: 825 Registered: July 2009 |
Senior Member |
|
|
Hi Stephan,
No, I'm just a Java developer trying to give back my part to the open source community. And I happen to be an Eclipse fan.
I was afraid my question would be received as criticism, which is it not, if you read it objectively. Of course you put in a lot of work in creating the ecj, and you are right that it is good for the community to have a second compiler. And not having the intimate knowledge of all the work that is put into ecj, I can speak from the perspective of a Eclipse user from ever since it was spawned from VisualAge. And is that I usually find that Eclipse is playing catch up after a new Java release. And it frustrates me that I have to switch to NetBeans or IntelliJ to (for my users) timely migrate my contribution of the open source community. I don't like the way these IDEs operate, have tried them many times over. And that, in fact, is a compliment.
But the fact remains that I was not able to migrate my project with Eclipse (maybe I had the wrong version - than it was unclear which one I needed, maybe I needed to twiddle something - I'm just a user of Eclipse), and I was able to do so hassle free with the free version of IntelliJ. So I hoped that as an intermediate solution using the javac would have been possible. But alas.
Thanks for responding!
Tom
|
|
| |
Goto Forum:
Current Time: Thu Sep 19 10:07:44 GMT 2024
Powered by FUDForum. Page generated in 0.04338 seconds
|