Drop support of older Java releases in ecj #820
Replies: 9 comments 11 replies
-
To clarify: I would be happy to drop specific sections of ancient code, when they interact with code being actively worked on. I would, however, caution against actively discarding big amounts of code without further scrutiny :) Still the message to users could well be along the lines of JEP 182, since "not supported" doesn't necessarily imply "has been removed from our code base completely". Such leeway between user expectation and implementation would be great. |
Beta Was this translation helpful? Give feedback.
-
@stephan-herrmann : with "if we can make our life easier" I meant that if some old code that added to support Java 1.0 hinders us to implement some bug of feature that is needed for Java 42, we should not hesitate to remove that and declare that 1.0 is not supported anymore. |
Beta Was this translation helpful? Give feedback.
-
See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=536194 |
Beta Was this translation helpful? Give feedback.
-
Just wanted to mention a subtle difference between the javac support strategy and what ecj might apply: if you need to compile against an older java version (for whatever reason), you could always just grab the older version of javac. You can't do the same with ecj within the Eclipse IDE. You could use an older version of the IDE that contains the older ecj version, but you would loose everything that happened to the IDE since then as well. Whether that makes a big difference or not, I can't judge (probably depends), but maybe worth to keep in mind. This is not meant as an argument to keep support for older Java versions in ecj, just wanted to mention that there is a somewhat tight relationship between ecj and the IDE. |
Beta Was this translation helpful? Give feedback.
-
A point related to Java versions supported by ECJ, might be the supported Execution-Environments: |
Beta Was this translation helpful? Give feedback.
-
This is kind of unrelated, as running something with Java 1.6 doesn't mean it has to be compiled in the IDE with Java 1.6 JLS. So one could debug application on Java 1.6 if it is compiled by old ecj / javac on command line. What constantly makes troubles for developers is that running full tests coverage for all "supported" versions takes too long, so we run only subset on jenkins / in the IDE and see later errors during SDK build (like in #2234 (comment)). And of course supporting older JLS doesn't make the code simpler after the fix... It simply constantly steals our time urgently needed elsewhere to support "modern" Java versions. |
Beta Was this translation helpful? Give feedback.
-
@merks, @scottslewis: assuming ECJ (Eclipse batch compiler) would discard Java 1.5 compilation target, would it be a blocker for EMF / ECF projects that still have set 1.5 JLS as target? I'm coming from #2434 (comment) where the compiler has a bug compiling projects targeting 1.5 JLS. Of course we will fix that for now, but it is not the first time where we need spend more time as we could afford for supporting ancient Java language specifications. So my proposal would be to drop support for all JLS specifications below 1.6 in Eclipse compiler in the next 4.33 SDK (or even below 1.7, in the same way how javac it does). This would mean, EMF & ECF would need to go at least to Java 1.6 (or even to 1.7 or as far as you can go). |
Beta Was this translation helpful? Give feedback.
-
I've created #2536 and plan to work on it next week. |
Beta Was this translation helpful? Give feedback.
-
Removing Java 7 and older support may not be that disruptive since there is no supported Java 7 runtime available anywhere to run on. Unfortunately Java 8 is here for many years to come (all the way to 2030). Much needs to be considered before removing Java 8 release support from ECJ. |
Beta Was this translation helpful? Give feedback.
-
Stephan asked good question, I'm not sure we've discussed that before.
The question is:
and my take on this is: if we can make our life easier, we should follow what javac does, and it does what was proposed in JEP-182: with each Java LTS release they seem to drop support for one of previous releases.
See
Current state in Java 17 (still same in 19):
WDYT?
Beta Was this translation helpful? Give feedback.
All reactions