Modify

Opened 23 months ago

Closed 14 months ago

Last modified 12 months ago

#16498 closed enhancement (fixed)

Add compatibility with Java 12

Reported by: Don-vip Owned by: team
Priority: normal Milestone: 19.03
Component: Core Version:
Keywords: java12 Cc:

Description (last modified by Don-vip)

Followup of #16047

First ​EA builds of Java 12 are available.

See #17516 for Java 13 compatibility.

Attachments (0)

Change History (22)

comment:1 Changed 23 months ago by Don-vip

Milestone: 19.03

comment:2 Changed 23 months ago by Don-vip

First problem: we can't compile tests due to ASM in Groovy:

test-compile:
  [groovyc] Compiling 513 source files to /var/lib/jenkins/jobs/Java-EarlyAccess-JOSM/workspace/jdk/JDK12/test/build/unit
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/var/lib/jenkins/jobs/Java-EarlyAccess-JOSM/workspace/jdk/JDK12/tools/groovy/groovy-2.5.1.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] General error during conversion: Unsupported class file major version 56
  [groovyc] 
  [groovyc] java.lang.IllegalArgumentException: Unsupported class file major version 56
  [groovyc] 	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:176)
  [groovyc] 	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:158)
  [groovyc] 	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:146)
  [groovyc] 	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:273)
  [groovyc] 	at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:83)
  [groovyc] 	at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:254)
  [groovyc] 	at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:192)
  [groovyc] 	at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:172)
  [groovyc] 	at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:128)
  [groovyc] 	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:59)
  [groovyc] 	at org.codehaus.groovy.ast.decompiled.Annotations.createAnnotationNode(Annotations.java:41)
  [groovyc] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.addAnnotations(DecompiledClassNode.java:219)
  [groovyc] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitSupers(DecompiledClassNode.java:183)
  [groovyc] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getUnresolvedSuperClass(DecompiledClassNode.java:127)
  [groovyc] 	at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:1024)
  [groovyc] 	at org.codehaus.groovy.control.ResolveVisitor.checkCyclicInheritance(ResolveVisitor.java:1396)
  [groovyc] 	at org.codehaus.groovy.control.ResolveVisitor.checkCyclicInheritance(ResolveVisitor.java:1396)
  [groovyc] 	at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1373)
  [groovyc] 	at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:219)
  [groovyc] 	at org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit$1.call(JavaAwareCompilationUnit.java:76)
  [groovyc] 	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)
  [groovyc] 	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:631)
  [groovyc] 	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:609)
  [groovyc] 	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:586)
  [groovyc] 	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:565)
  [groovyc] 	at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:75)
  [groovyc] 	at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:243)
  [groovyc] 	at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:1204)
  [groovyc] 	at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:1256)
  [groovyc] 	at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:851)
  [groovyc] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
  [groovyc] 	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  [groovyc] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [groovyc] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  [groovyc] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
  [groovyc] 	at org.apache.tools.ant.Task.perform(Task.java:350)
  [groovyc] 	at java.base/java.util.Vector.forEach(Vector.java:1387)
  [groovyc] 	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
  [groovyc] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
  [groovyc] 	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  [groovyc] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [groovyc] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  [groovyc] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
  [groovyc] 	at org.apache.tools.ant.Task.perform(Task.java:350)
  [groovyc] 	at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
  [groovyc] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
  [groovyc] 	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  [groovyc] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [groovyc] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  [groovyc] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
  [groovyc] 	at org.apache.tools.ant.Task.perform(Task.java:350)
  [groovyc] 	at org.apache.tools.ant.Target.execute(Target.java:449)
  [groovyc] 	at org.apache.tools.ant.Target.performTasks(Target.java:470)
  [groovyc] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
  [groovyc] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
  [groovyc] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [groovyc] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
  [groovyc] 	at org.apache.tools.ant.Main.runBuild(Main.java:834)
  [groovyc] 	at org.apache.tools.ant.Main.startAnt(Main.java:223)
  [groovyc] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
  [groovyc] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

comment:3 Changed 23 months ago by Don-vip

In 14039/josm:

see #16498 - convert one more unit test to Java

comment:4 Changed 23 months ago by Don-vip

In 14040/josm:

see #16498 - convert one more unit test to Java, fix code style issues

comment:5 Changed 23 months ago by Don-vip

In 14044/josm:

see #16498 - convert one more unit test to Java

comment:6 Changed 23 months ago by Don-vip

In 14047/josm:

see #16498 - convert two more unit tests to Java

comment:7 Changed 23 months ago by Don-vip

In 14048/josm:

see #16498 - convert more unit tests to Java

comment:8 Changed 22 months ago by Don-vip

In 14064/josm:

see #16498 - convert last unit tests to Java

comment:9 Changed 22 months ago by Don-vip

In 14065/josm:

see #16498 - drop Groovy compiler

comment:10 Changed 22 months ago by Don-vip

No particular issue with Java 12 right now. All failures are due to JMockit on Java 11+ (see #16047)

comment:11 Changed 22 months ago by Don-vip

In 14171/josm:

see #16047, see #16498 - update to jacoco 0.8.2.20180819 for Java 11 compatibility. Keep it disabled for Java 12

See https://github.com/jacoco/jacoco/issues/663

comment:12 Changed 22 months ago by Don-vip

In 14172/josm:

see #16498 - jacoco 0.8.2.20180819 already supports Java 12 in fact :)

See https://github.com/jacoco/jacoco/issues/738

comment:13 Changed 21 months ago by Don-vip

Description: modified (diff)

comment:14 Changed 21 months ago by Don-vip

In 14218/josm:

see #16498 - update to error_prone 2.3.2-20180817.184126-35 to test JDK 12 compatibility.

See https://github.com/google/error-prone/issues/1106

comment:15 Changed 21 months ago by Don-vip

In 14222/josm:

see #16498 - simplify build.xml and update to latest snapshot of error_prone, patched for Java 12 compatibility

See https://github.com/google/error-prone/pull/1107
See https://github.com/google/error-prone/commit/3f2ca43e53266e84e17e4fb3f34888be5cb29293#commitcomment-30382503

comment:16 Changed 21 months ago by Don-vip

In 14223/josm:

see #16498 - update shaded error_prone_core.jar to include org.checkerframework:dataflow

comment:17 Changed 21 months ago by Don-vip

In 14224/josm:

see #16498 - update shaded error_prone_core.jar to include all required dependencies

comment:20 Changed 14 months ago by Don-vip

Resolution: fixed
Status: newclosed

Java 12 is so boring (almost nothing new in it) that's we're compatible with it for a long time already.

Last edited 14 months ago by Don-vip (previous) (diff)

comment:21 Changed 14 months ago by Don-vip

Description: modified (diff)

comment:22 Changed 12 months ago by Don-vip

In 15128/josm:

see #16047, see #16498, see #17516, fix #17723

  • add java.scripting module when loading JOSM with Java 11+
  • detect java 12/13 on Linux

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.