-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[WIP] First attempt for JDK11 compilation - #Java11 #3421
Conversation
It seems, we are going to ship different jars for different JREs. Think, we have to continue working on #3180 to get this done?! |
Yes, however, there is also the experimental gradle stuff to create multi release jar. https://github.com/FrVaBe/Java9/tree/master/multi-release-jar |
One of our core problems here at the moment seems to be a split package problem, i.e. several of the modules we use (open office stuff, jgoodies, ...) export the same package from different modules. When that happens, Java will report an error of the form
I am still looking for a solution to this that is not too much effort. One seems to be to package the two modules together manually into a single module that JabRef could depend upon. That is absolutely no solution for us, because it means that we would have to repackage tons of outdated and no longer maintained libraries. |
Well, at least jgoodies will be removed by your other PR. A better toolfor identifying split classes: In general: |
A hands-on guide that has helped me to resolve some problems with internal accesses: |
Hey, I'm a student of @stefan-kolb and I'm planning to write my Bachelor's Thesis on Java 9 Migration. I'd like to have a look on this. |
I am glad to hear that! Just a remark: Although we try to add module files here, the module system is not our first priority when it comes to Java 9. Getting rid of all accesses to internal libraries is the initial obstacle. So, as a start, you might want to look at that problem. |
With the removal of our customjfx component in the future #3779 we will be one step closer to no internal dependencies. I think we should consider basing this branch on the maintable beta? |
build.gradle
Outdated
@@ -24,7 +24,8 @@ plugins { | |||
id "de.sebastianboegl.shadow.transformer.log4j" version "2.1.1" | |||
id "com.simonharrer.modernizer" version '1.5.0-1' | |||
id 'me.champeau.gradle.jmh' version '0.4.3' | |||
id 'net.ltgt.errorprone' version '0.0.13' | |||
id 'com.zyxist.chainsaw' version '0.1.3' | |||
//id 'net.ltgt.errorprone' version '0.0.13' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we support error prone any more? This should be commented inside build.gradle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at that time it did not work. Therefore I uncommented that. But have no clue if it's just the version or module stuff.
Another interesting aspect: Dependencies on JAVA EE modules ( java.mail for example) etc are soon no longer part of JAVA SE. http://openjdk.java.net/jeps/320 The good news: Nearly all EE modules are available as reference implementation on github and can be integrated as an example. |
I currently have a version that compiles with Java 9 in my fork, where I temporarily removed the dependencies with split packages. However I've got some new problems:
I'd really appreciate if someone could have a look into this. |
Hi, I am not that deep into that, but I think in such cases you need to specify |
Hey, thanks for your help. I just tried that, but this seems to just add the modules to the module path during compilation, but not actually at runtime. |
@florian-beetz That are already good news. Nice work! |
@tobiasdiez Thank you. |
At least for guava, this should be fixed/fixable if I understand google/guava#2782 (comment) correctly. |
I was able to fix the JSR 305 problem now. Also there is currently an open Guava issue to replace JSR 305 completely google/guava#2960 |
@florian-beetz Nice 👍 Would you like to share your current progress via a PR with us? |
@stefan-kolb Sure, should I just open a new one? I can't seem to add my changes to this one. |
I guess so, we can close this one then in favor of your new one! You have all the changes of this one in your branch?! |
@stefan-kolb Maybe we can give him push rights for the branches here? |
Is that possible? Would also be fine but I guess it complicates things unecessesarily. |
@Siedlerchr We already have that in: https://github.com/JabRef/jabref/blob/jdk9/build.gradle#L111 The issue currently is:
In other words:
with A being This is a contradition |
New dependencies can introuce spooky issues: #5217 |
All tests green. GuiTests are properly ignored now. Before that, we had
|
This addresses #2594.
I played around a bit with the jigsaw module stuff.
Does not yet compile complete, but it's a step in the right direction.
If anyone is interested in this stuff, please move ahead.
gradle localizationUpdate
?