Skip to content
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

[J11] Prepare Java 11 Support #1182

Closed
cdietrich opened this issue Mar 23, 2018 · 26 comments
Closed

[J11] Prepare Java 11 Support #1182

cdietrich opened this issue Mar 23, 2018 · 26 comments
Assignees
Milestone

Comments

@cdietrich
Copy link
Contributor

cdietrich commented Mar 23, 2018

Xtext should not "explode" with Java 11

@cdietrich cdietrich added this to the Release_2.15 milestone Mar 23, 2018
@cdietrich
Copy link
Contributor Author

see #2578

@cdietrich
Copy link
Contributor Author

@cdietrich cdietrich modified the milestones: Release_2.15, Release_2.16 Aug 16, 2018
@cdietrich
Copy link
Contributor Author

wont ship this with 2.15 so moved to 2.16

@jpaw
Copy link

jpaw commented Sep 1, 2018

An upgrade of guice will be required. As a quick test, I changed the guice release from 3.0 to 4.2.0. In xtext-core, then 12 tests fail (but that's less than 1% of all tests :-)).
In xtext-xtend, I also had to upgrade org.eclipse.core.runtime in order to avoid some signature mismatch exception, but afterwards, the resulting xtend-maven-plugin does not show the warnings about illegal reflective access any more when running with Java 10. Java 11 still does not work, so there's more to update, I will keep testing.
(Btw, I used the "no_aop" classifier for guice, this did not make any difference related to the number of failing tests. guice still bundles / repackages cglib and asm, and 4.2.0 still does not use the most recent ones, but with the classifiers "no_aop" and "classes" versions without that are available as well.)

@cdietrich
Copy link
Contributor Author

how did you deal with guice 4.x needing a newer guava? see eclipse/xtext-core#393

@cdietrich
Copy link
Contributor Author

cdietrich commented Sep 1, 2018

@szarnekow do you know of any ussages of the guice aop part? do you remember which version of guice we use? https://dev.eclipse.org/ipzilla/show_bug.cgi?id=6118 reads like we use the non aop variant at lease eclipse/manifest wise

@jpaw
Copy link

jpaw commented Sep 1, 2018

I did not get any exception of the type described in eclipse/xtext-core#393.
Related to the classifiers, I got the information from this discussion: google/guice#1198

@cdietrich
Copy link
Contributor Author

Another thing I don’t know is that such a change would mean for (binary) compatibility and if it would require a Xtext 3.0 @svenefftinge can you share your knowledge with that

@cdietrich
Copy link
Contributor Author

@jpaw did you investigate if this can be done without a guice/guava bump? for java 9 and 10 it was possible. or did you do the bump to get rid of the reflection warnings?

@svenefftinge
Copy link
Contributor

We should not bump the major version. Also see discussion here: https://dev.eclipse.org/mhonarc/lists/modeling-pmc/msg04475.html

@jpaw
Copy link

jpaw commented Sep 3, 2018

Related to the version bump of guava:
guice used 19.0 until very recently, in commits eface22... (just before the 4.2.0 tag) and in 289073...
apparently mainly to be able to use a newer version of the truth test library (that upgrade was done after the 4.2.0 tag). This would allow the version range [19.0, 20.0 and 22.0) which should work for xtext as well as guice. I rebuilt guice 4.2.0, but with a guava 20.0 dependency, and same results (20.0 is the last guava release which offers Java 6 compatibility).

Related to guice: xtext currently uses 3.0, which does not yet offer the no_aop version. guice 3.x is officially not even compatible with Java 8 (guice 4.0 ff are), so I doubt it will work with Java 11.

With my test builds of the xtext / xtend plugins, I'm currently stuck with "ResourceNotLoaded" or
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.xtext.common.types.access.TypeResource$CannotLoadTypeResourceException: java.lang.UnsupportedOperationException at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException (ResourceSetImpl.java:319) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper (ResourceSetImpl.java:278) at org.eclipse.xtext.resource.XtextResourceSet.getResource (XtextResourceSet.java:265)
I will retest this with emf 2.15.0 as soon as that has been released (current test used emf 2.12.0).

@cdietrich
Copy link
Contributor Author

cdietrich commented Sep 3, 2018

the current guice (the one consumved via orbit has aop switched off) so you are taking about the maven/gradle dependency?
it was working with java 9 and 10. the question: are we talking about the xtext built itself or projects using xtext?

@jpaw
Copy link

jpaw commented Sep 3, 2018

I'm currently mainly interested in using xtext, that is, invoking xtext-maven-plugin and xtend-maven-plugin from a maven build job which is executed by JDK 11.
Of course the fallback would be to run the build with Java 8 and to only use Java 11 at runtime, but that would restrict using Java 9/10/11 features to be used in pure Java projects only.

@cdietrich
Copy link
Contributor Author

I would have expected that would have worked by simply bumping the jdt version (not out yet) and introducing a new entry in the javaversion enum

@cdietrich
Copy link
Contributor Author

we require asm7 and the usage of OpCodes.ASM7 to get this running

@cdietrich
Copy link
Contributor Author

cdietrich commented Oct 12, 2018

Address javax.annotation.Generated

@cdietrich
Copy link
Contributor Author

cdietrich commented Oct 25, 2018

we should consider replacing the 3 single jdt plugins we consume from maven with the ecj jar (needs deeper investigation, e.g. how it relates to platform jars)
tycho does the same eclipse-tycho/tycho@8368ab9

@chrswk
Copy link

chrswk commented Oct 26, 2018

So Java 11 support is planned for 2.16.0, correct? Do you have any idea about the schedule?

@cdietrich
Copy link
Contributor Author

2.16 is planned for 2018-12. We are still lining up for

  • ASM 7 final at maven and eclipse orbit
  • Tycho 1.3
  • Maven Consumable Artifacts for JDT

@chrswk
Copy link

chrswk commented Oct 26, 2018

Great, thanks for the information! 👍

cdietrich added a commit to eclipse/xtext-core that referenced this issue Oct 27, 2018
cdietrich added a commit to eclipse/xtext-core that referenced this issue Oct 27, 2018
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Oct 27, 2018
cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Oct 27, 2018
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Oct 27, 2018
@cdietrich
Copy link
Contributor Author

cdietrich commented Oct 27, 2018

emf.codegen.ecore needs org.eclipse.jdt.core.formatter.CodeFormatter which is not part of ecj

https://repo.eclipse.org/content/repositories/eclipse-staging/org/eclipse/jdt/org.eclipse.jdt.core/ does not contains compiler tool

created https://bugs.eclipse.org/bugs/show_bug.cgi?id=540530

cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Dec 21, 2018
@cdietrich cdietrich self-assigned this Dec 21, 2018
cdietrich added a commit to eclipse/xtext-maven that referenced this issue Dec 21, 2018
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-maven that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-eclipse that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jan 12, 2019
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 13, 2019
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-eclipse that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-maven that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-xtend that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Jan 22, 2019
cdietrich added a commit to eclipse/xtext-lib that referenced this issue Jan 28, 2019
cdietrich added a commit to eclipse/xtext-core that referenced this issue Jan 28, 2019
cdietrich added a commit to eclipse/xtext-extras that referenced this issue Jan 28, 2019
cdietrich added a commit to eclipse/xtext-eclipse that referenced this issue Jan 28, 2019
@cdietrich
Copy link
Contributor Author

Fixed in Xtext/Xtend 2.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants