Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse JDT.core breaking dependency change
Eclipse JDT.core breaking dependency change [message #1842375] Thu, 17 June 2021 10:43 Go to next message
Jakub Małek is currently offline Jakub MałekFriend
Messages: 4
Registered: June 2021
Junior Member
Hi,
there has been a breaking change when it comes to org.eclipse.jdt.core dependencies.
The org.eclipse.core.resources-3.15.0 and org.eclipse.text-3.12.0 released on June 15, 2021 has been compiled with Java 11 source compatibility (55). Which in consequence causes failures in all Java8 components using org.eclipse.jdt.core version [3.11.0, 3.27.0[.

I see that org.eclipse.jdt.core-3.26.0 was released on very same day. If there is a plan to stop supporting Java8, I would expect that versions [3.11.0, 3.26.0[ should be sealed to not use new artifacts.

Please let me know if it was released in that bye-code by mistake or is it a breaking change. If it's the latter I would like to know if there are plans to seal the version ranges for previous releases.

Best Regards,
Jakub
Re: Eclipse JDT.core breaking dependency change [message #1842385 is a reply to message #1842375] Thu, 17 June 2021 12:57 Go to previous messageGo to next message
Sarika Sinha is currently offline Sarika SinhaFriend
Messages: 131
Registered: February 2010
Location: Bangalore, India
Senior Member
Hi,
What do you mean by ?
"Which in consequence causes failures in all Java8 components" ?



Sarika Sinha
JDT Programmer
Re: Eclipse JDT.core breaking dependency change [message #1842388 is a reply to message #1842385] Thu, 17 June 2021 13:09 Go to previous messageGo to next message
Jakub Małek is currently offline Jakub MałekFriend
Messages: 4
Registered: June 2021
Junior Member
When org.eclipse.jdt.core is used in component compiled with JDK 8 source compatibility, then:
 java.lang.UnsupportedClassVersionError: org/eclipse/jface/text/BadLocationException has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

exception is thrown in the Runtime when the JDT is being used.

In my case I'm using it to format the generated java code so the Gradle plugin is throwing that error.
Re: Eclipse JDT.core breaking dependency change [message #1842390 is a reply to message #1842388] Thu, 17 June 2021 13:27 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

There is current a discussion on the cross-project-dev mailing list and on https://bugs.eclipse.org/bugs/show_bug.cgi?id=572389 about whether JDT should move to only Java 11 or only Java latest LTS.

Unfortunately it seems that the platform has already decided to mandate Java 11 for standalone usage, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=574259

Today with latest Eclipse 2021-06 don't think about using anything less than Java 11.

Regards

Ed Willink
Re: Eclipse JDT.core breaking dependency change [message #1842391 is a reply to message #1842390] Thu, 17 June 2021 14:22 Go to previous messageGo to next message
Jakub Małek is currently offline Jakub MałekFriend
Messages: 4
Registered: June 2021
Junior Member
Hi Ed,
I understand, the migration to Java 11 was only matter of time I suppose. That said it would be a good practice to switch to major version on such upgrade, so that the existing libraries wont suddenly break.

In the case org.eclipse.jdt.core the dependencies are not fixed. For example dependency to org.eclipse.core.resources is set to 3.14.0,4.0.0) and version 3.15.0 is a breaking change in regards to source compatibility.

My suggestion would be to either upgrade the major versions for Java 11 to 4.0.0+ or to rollout patched versions 3.26.0 down to 3.12.0 with sealed dependencies e.g. 3.14.0,3.15.0).

In my case unfortunately we have to partially support JDK 8 for some time and right now I had to revert back to version 3.10.0 in order to do so.
Re: Eclipse JDT.core breaking dependency change [message #1842397 is a reply to message #1842391] Thu, 17 June 2021 16:06 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

While I am unhappy about the breakages, I must correct you on one point. The version compatibility is concerned with binary compatibility; already compiled programs should not break. It is ok to break source compatibility, since developers can fix hopefully minor issues as they re-compile.

Regards

Ed Willink
Re: Eclipse JDT.core breaking dependency change [message #1842415 is a reply to message #1842397] Fri, 18 June 2021 06:52 Go to previous messageGo to next message
Jakub Małek is currently offline Jakub MałekFriend
Messages: 4
Registered: June 2021
Junior Member
Hi Ed,
technically that is correct, nevertheless the binary re-compilation will only work if you don't use API from new SDK.

Overall, it's not a huge problem for me to stick with old version or to restrict the versions of referenced dependencies manually, at least until fully switch to new JDK will be completed on my end. I just wanted to know if there are any plans to seal the versions or not, so I know how to proceed.

Best Regards,
Jakub
Re: Eclipse JDT.core breaking dependency change [message #1842417 is a reply to message #1842415] Fri, 18 June 2021 07:18 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You need to see how the current debate works out. (All caused my the instabilities and rapid changes in Java exhausting developer bandwidth).

On the one hand Eclipse may move to latest Java only, which is clearly too limited, but all the developers can realistically manage.

On the other hand Eclipse may remain massively compatible, which is clearly too extensive.

Some compromise (and funding) needs to be found.

Regards

Ed Willink
Previous Topic:All Java 8 classes opened in 2021-13 fail with Java 9 related error, but perhaps caused by Java 16
Next Topic:Egit and Switching Between Master and Branch
Goto Forum:
  


Current Time: Thu Mar 28 08:27:14 GMT 2024

Powered by FUDForum. Page generated in 0.06934 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top