You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shouldn't be a big deal to support it, but we might have to think about keeping our default to whatever the last Java-8 supported version is. I'm hesitant to make our defaults require Java 11, though maybe the landscape will change in the next 6 months.
I don't see any urgency to adapt things on Spotless side. There will probably upcoming changes in the Eclipse plugins. But when this will affect a plugins used by Spotless is uncertain.
Most likely it will affect the framework bundles provided by eclipse-base first, but since eclipse-base has no immediate effect on the code formatting itself, but just on the environment, it might help to freeze eclipse-base dependency versions for a limited amount of time.
Just released Goomph 3.25.0, which adds support for Eclipse 4.17 (2020-09). The mavencentral part that we use is working, but the change to Java 11 presented some problems for me. Hopefully the Spotless stuff will just work, since @fvgh's framework allows us to skip most of the OSGi stuff.
Funnily the classes for 2020.09 release obtained via M2 do not make any trouble using Java 8.
The classes obtained from P2 (for fat JARs) do cause UnsupportedClassVersionError.
So JDT core 3.23 (which provides support for Java 11, but I think also for 14) can be used with Java 8. Currently no problems have been found, but final tests are missing.
Since for the fat JARs (WDT, CDT) the P2 part contains anyhow parts requiring Java 11, the corresponding projects should change their compiler/target version to Java 11.
For Groovy the evaluation is ongoing, whether a switch from P2 to M2 is possible.
Funnily the classes for 2020.09 release obtained via M2 do not make any trouble using Java 8.
Interesting! My experience running 2020.09 with Java 8 was vaguely similar. It did start, but it was definitely broken. Couldn't tell exactly which component broke, just that the IDE was not functional.
The docs for 4.17 still claim that Java 11 is required...
@nedtwigg As far as I saw from the P2 behaviour, the problem occurs at runtime, so whether one of the dependent JARs requires Java 11 is only visible as soon as the JAR is loaded. So it might be more conservative to use Java 11 on all new versions of the Eclipse extensions. Agreed?
@nedtwigg Sorry, had a second thought. Was so perplex about another issue I had with the fat JAR extensions.
So the doc states:
A Java 11 or newer JRE/JDK is required, LTS release are preferred to run all Eclipse 2020-09 packages based on Eclipse 4.17, as well as the Installer.
All _ext projects have individual managed package dependencies which ape the once of a Eclipse release required by a formatter or the minimalistic framework (base).
My goal with the _ext tests is the proper testing of all Eclipse interfaces used by the formatter. I think I at least use all external JARs. So if my tests do pass with Java 8, Java 11 is not required.
Since I believe in my testing there is no need to be conservative. Java 11 should only be demanded if required. Otherwise _ext projects should stick to the Spotless default Java version, which is currently 8.
Hi every body, i have issue when I update spotless from version 5.15.0 to version 6.11.0, after that I got an error when I use this config in spotless config. My project is run with java 8.
my config:
after I run spotless, I got an error when my project call function removeUnusedImports() and eclipse('4.17.0').configFile("$rootDir/.codestyle/testspotless.xml"): Cannot change dependencies of dependency configuration ':spotless-209723591' after it has been resolved.
When I use eclipse version 4.16.0, the error is the same.
Could you please help me solve this issue? if you know what ticket related to this issue, please guide me!
Thank you very much!
Activity
fvgh commentedon Mar 26, 2020
I don't see any urgency to adapt things on Spotless side. There will probably upcoming changes in the Eclipse plugins. But when this will affect a plugins used by Spotless is uncertain.
Most likely it will affect the framework bundles provided by
eclipse-basefirst, but sinceeclipse-basehas no immediate effect on the code formatting itself, but just on the environment, it might help to freezeeclipse-basedependency versions for a limited amount of time.nedtwigg commentedon Sep 8, 2020
I'm inclined to take the same approach here as we did in #687, specifically
spotless/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java
Lines 88 to 91 in 74d964d
possibly coupled with
spotless/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java
Lines 220 to 233 in 74d964d
nedtwigg commentedon Sep 17, 2020
Just released Goomph
3.25.0, which adds support for Eclipse 4.17 (2020-09). Themavencentralpart that we use is working, but the change to Java 11 presented some problems for me. Hopefully the Spotless stuff will just work, since @fvgh's framework allows us to skip most of the OSGi stuff.fvgh commentedon Sep 24, 2020
Funnily the classes for 2020.09 release obtained via M2 do not make any trouble using Java 8.
The classes obtained from P2 (for fat JARs) do cause
UnsupportedClassVersionError.So JDT core 3.23 (which provides support for Java 11, but I think also for 14) can be used with Java 8. Currently no problems have been found, but final tests are missing.
Since for the fat JARs (WDT, CDT) the P2 part contains anyhow parts requiring Java 11, the corresponding projects should change their compiler/target version to Java 11.
For Groovy the evaluation is ongoing, whether a switch from P2 to M2 is possible.
nedtwigg commentedon Sep 24, 2020
Interesting! My experience running 2020.09 with Java 8 was vaguely similar. It did start, but it was definitely broken. Couldn't tell exactly which component broke, just that the IDE was not functional.
The docs for 4.17 still claim that Java 11 is required...
fvgh commentedon Sep 24, 2020
@nedtwigg As far as I saw from the P2 behaviour, the problem occurs at runtime, so whether one of the dependent JARs requires Java 11 is only visible as soon as the JAR is loaded. So it might be more conservative to use Java 11 on all new versions of the Eclipse extensions. Agreed?
fvgh commentedon Sep 24, 2020
@nedtwigg Sorry, had a second thought. Was so perplex about another issue I had with the fat JAR extensions.
So the doc states:
All
_extprojects have individual managed package dependencies which ape the once of a Eclipse release required by a formatter or the minimalistic framework (base).My goal with the
_exttests is the proper testing of all Eclipse interfaces used by the formatter. I think I at least use all external JARs. So if my tests do pass with Java 8, Java 11 is not required.Since I believe in my testing there is no need to be conservative. Java 11 should only be demanded if required. Otherwise
_extprojects should stick to the Spotless default Java version, which is currently 8.nedtwigg commentedon Sep 24, 2020
Sounds good to me!
nedtwigg commentedon Oct 20, 2020
Thanks to @fvgh, this has been fixed in
plugin-gradle 5.7.0andplugin-maven 2.5.0toanle2022 commentedon Oct 17, 2022
Hi every body, i have issue when I update spotless from version 5.15.0 to version 6.11.0, after that I got an error when I use this config in spotless config. My project is run with java 8.
my config:
after I run spotless, I got an error when my project call function
removeUnusedImports()andeclipse('4.17.0').configFile("$rootDir/.codestyle/testspotless.xml"):Cannot change dependencies of dependency configuration ':spotless-209723591' after it has been resolved.When I use
eclipse version 4.16.0,the error is the same.Could you please help me solve this issue? if you know what ticket related to this issue, please guide me!
Thank you very much!
nedtwigg commentedon Oct 19, 2022
@toanle2022 You might want to try to predeclare your deps.