Groovy and JDK 11: Compilation issue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Groovy and JDK 11: Compilation issue

Misagh Moayyed
Has anyone here tried to use Apache Groovy 2.5.1 or 3.x and JDK 11 together? I am trying to troubleshoot a build failure (Using Gradle 4.8, or 4.9) that manifests itself as:

...
General error during class generation: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
at groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
....

Here is the full output of the failure:
https://travis-ci.org/apereo/cas/builds/409569422

It appears to me that perhaps JDK 11 support for Groovy still has a few rough edges and may not be "officially" there. Could someone confirm this please?

Thanks. 

--Misagh
MG
Reply | Threaded
Open this post in threaded view
|

Re: Groovy and JDK 11: Compilation issue

MG
FYI: Groovy 2.4.15 under the current OpenJDK 11 prerelease, with IntelliJ as the build system ran (after the JDK deprecation fixes we needed, described in previous email) without any problems with our 900+ (database/integration) tests (WIN7), as well as Vaadin 7 (RHEL).

-------- Ursprüngliche Nachricht --------
Von: Misagh Moayyed <[hidden email]>
Datum: 30.07.18 18:32 (GMT+00:00)
Betreff: Groovy and JDK 11: Compilation issue

Has anyone here tried to use Apache Groovy 2.5.1 or 3.x and JDK 11 together? I am trying to troubleshoot a build failure (Using Gradle 4.8, or 4.9) that manifests itself as:

...
General error during class generation: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
at groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
....

Here is the full output of the failure:
https://travis-ci.org/apereo/cas/builds/409569422

It appears to me that perhaps JDK 11 support for Groovy still has a few rough edges and may not be "officially" there. Could someone confirm this please?

Thanks. 

--Misagh
Reply | Threaded
Open this post in threaded view
|

Re: Groovy and JDK 11: Compilation issue

paulk_asert
In reply to this post by Misagh Moayyed
We use ASM 6.2 with the ASM API version set to ASM6 in Groovy 2.5.1.
We use ASM 6.2 with the ASM API version set to ASM7_EXPERIMENTAL in Groovy 3 alphas.

As per ASMs current strategy (archive protected by a spambot link - click through and follow date):

https://mail.ow2.org/wws/arc/asm/2018-05/msg00000.html

This means that we currently fully support JDK10 in 2.5.x and JDK11 in 3.x (bar some warnings and full support for modules which we are working on).

We slide those ASM versions along as new versions are released (after testing of course). We have been conservative so far and not tried to put the "EXPERIMENTAL" variants in final versions of Groovy. We can re-assess that approach if we need to but it might introduce incompatibilities between Groovy versions that we'd like to avoid.

Having said that, if you have simple code, you might find that it compiles and runs fine on JDK11.
Or compiles on earlier versions but runs fine on JDK11 and 12 after that.

The master branch of Groovy builds and the runs 10,000+ tests on JDK11 last I checked.

Cheers, Paul.


On Tue, Jul 31, 2018 at 3:33 AM Misagh Moayyed <[hidden email]> wrote:
Has anyone here tried to use Apache Groovy 2.5.1 or 3.x and JDK 11 together? I am trying to troubleshoot a build failure (Using Gradle 4.8, or 4.9) that manifests itself as:

...
General error during class generation: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
at groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
....

Here is the full output of the failure:

It appears to me that perhaps JDK 11 support for Groovy still has a few rough edges and may not be "officially" there. Could someone confirm this please?

Thanks. 

--Misagh
Reply | Threaded
Open this post in threaded view
|

Re: Groovy and JDK 11: Compilation issue

paulk_asert
When I said "fully support JDK11 in Groovy 3 alphas", I should have said "up to the point that the experimental parts of ASM cover". Having said that, if you find errors in the JDK11 support, please file a Jira with a small reproducible test case if possible. It could involve an edge case that we haven't seen yet or it might be something we need to pass on to the ASM project.

Cheers, Paul.

On Tue, Jul 31, 2018 at 5:18 AM Paul King <[hidden email]> wrote:
We use ASM 6.2 with the ASM API version set to ASM6 in Groovy 2.5.1.
We use ASM 6.2 with the ASM API version set to ASM7_EXPERIMENTAL in Groovy 3 alphas.

As per ASMs current strategy (archive protected by a spambot link - click through and follow date):

https://mail.ow2.org/wws/arc/asm/2018-05/msg00000.html

This means that we currently fully support JDK10 in 2.5.x and JDK11 in 3.x (bar some warnings and full support for modules which we are working on).

We slide those ASM versions along as new versions are released (after testing of course). We have been conservative so far and not tried to put the "EXPERIMENTAL" variants in final versions of Groovy. We can re-assess that approach if we need to but it might introduce incompatibilities between Groovy versions that we'd like to avoid.

Having said that, if you have simple code, you might find that it compiles and runs fine on JDK11.
Or compiles on earlier versions but runs fine on JDK11 and 12 after that.

The master branch of Groovy builds and the runs 10,000+ tests on JDK11 last I checked.

Cheers, Paul.


On Tue, Jul 31, 2018 at 3:33 AM Misagh Moayyed <[hidden email]> wrote:
Has anyone here tried to use Apache Groovy 2.5.1 or 3.x and JDK 11 together? I am trying to troubleshoot a build failure (Using Gradle 4.8, or 4.9) that manifests itself as:

...
General error during class generation: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
at groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
....

Here is the full output of the failure:

It appears to me that perhaps JDK 11 support for Groovy still has a few rough edges and may not be "officially" there. Could someone confirm this please?

Thanks. 

--Misagh