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

Update infrastructure to Java 11 (Jenkins, etc) #4192

Closed
monperrus opened this issue Sep 30, 2021 · 30 comments
Closed

Update infrastructure to Java 11 (Jenkins, etc) #4192

monperrus opened this issue Sep 30, 2021 · 30 comments

Comments

@monperrus
Copy link
Collaborator

In our CI https://ci.inria.fr/sos/, we now run spoon-maven-plugin with Java 11.

However, it crashes with

[ERROR] Failed to execute goal fr.inria.gforge.spoon:spoon-maven-plugin:3.1:generate (default) on project guice: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') -> [Help 1]

Ref: https://ci.inria.fr/sos/job/Google%20Guice/1846/console

@monperrus
Copy link
Collaborator Author

Indeed spoon-maven-plugin's CI fails with 11: SpoonLabs/spoon-maven-plugin#80

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 1, 2021

Spoon-maven-plugin in Java 11 merged: SpoonLabs/spoon-maven-plugin#80

@monperrus
Copy link
Collaborator Author

Now problem with classloader, WIP at SpoonLabs/spoon-maven-plugin#104

@monperrus
Copy link
Collaborator Author

SpoonLabs/spoon-maven-plugin#104 merged!

@monperrus monperrus changed the title spoon-maven-plugin crashes on Java 11 Jenkins CI jobs crash on Java 11 Oct 5, 2021
@monperrus
Copy link
Collaborator Author

Next step to fix SOS is #4206

@monperrus monperrus changed the title Jenkins CI jobs crash on Java 11 Update infrastructure to Java 11 (Jenkins, etc) Oct 6, 2021
@monperrus
Copy link
Collaborator Author

FYI, updated the website deployer action to Java 11 SpoonLabs/SpoonLabs.github.io@eb426c2

@monperrus
Copy link
Collaborator Author

Bukkit is green again: https://ci.inria.fr/sos/job/Bukkit/2101/

@monperrus
Copy link
Collaborator Author

Java8-workshop is green again: https://ci.inria.fr/sos/job/Java8%20Workshop/2228/

@monperrus
Copy link
Collaborator Author

AssertJ is green again: https://ci.inria.fr/sos/job/AssertJ/1852/display/redirect

@monperrus
Copy link
Collaborator Author

The other failures are due to the projects under test not being Java 11 compatible. The changes in spoon-maven-plugin seem OK, I'll publish spoon-maven-plugin 3.5.

@monperrus
Copy link
Collaborator Author

Added new Java 11 job https://ci.inria.fr/sos/job/JWT4B/

(from useful @khaes-kth's list of Java 11 compatible projects: https://github.com/khaes-kth/Sorald-experiments/blob/master/considered_repos_stats.csv)

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 15, 2021

Casper now works on Java 11: https://ci.inria.fr/sos/job/casper/1794/console

Changelog:

  • bumped ASM and fix backward incompatibilities with RemappingFieldAdapter
  • had to do some surgery to remove runtime annotation HotSpotIntrinsicCandidate

Reference: Spirals-Team/casper@cb193c6

CC @bcornu @barr @seintur

@monperrus
Copy link
Collaborator Author

NPEFix is green again: https://ci.inria.fr/sos/job/npefix/1724/console (the problem was jacoco compatibility)

@monperrus
Copy link
Collaborator Author

New job jtar is green: https://ci.inria.fr/sos/job/jtar/17/

@monperrus
Copy link
Collaborator Author

Dislrucache is green again: https://ci.inria.fr/sos/job/DiskLruCache/2234/

@monperrus
Copy link
Collaborator Author

Jimfs is green again https://ci.inria.fr/sos/job/Jimfs/1809/console

@monperrus
Copy link
Collaborator Author

Jsoup is green again https://ci.inria.fr/sos/job/Jsoup/1846/

@monperrus
Copy link
Collaborator Author

Google Guice is green again: https://ci.inria.fr/sos/job/Google%20Guice/1898/display/redirect

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 22, 2021

Joda time is green again: https://ci.inria.fr/sos/job/Joda%20Time/1866/

Had to remove two tests which are JVM dependent in a hard-coded manner, with no good support for Java 11:

     public void testGetName_berlin_english() {
      DateTimeZone berlin = DateTimeZone.forID("Europe/Berlin");
      if (JDK9) {
          assertEquals("Central European Standard Time", berlin.getName(TEST_TIME_WINTER, Locale.ENGLISH));
      } else {
          assertEquals("Central European Time", berlin.getName(TEST_TIME_WINTER, Locale.ENGLISH));
      }
      assertEquals("Central European Summer Time", berlin.getName(TEST_TIME_SUMMER, Locale.ENGLISH));
    }

    public void testGetName_berlin_german() {
        DateTimeZone berlin = DateTimeZone.forID("Europe/Berlin");
        if (JDK9) {
            assertEquals("Mitteleurop\u00e4ische Normalzeit", berlin.getName(TEST_TIME_WINTER, Locale.GERMAN));
            assertEquals("Mitteleurop\u00e4ische Sommerzeit", berlin.getName(TEST_TIME_SUMMER, Locale.GERMAN));
        } else if (JDK6PLUS) {
            assertEquals("Mitteleurop\u00e4ische Zeit", berlin.getName(TEST_TIME_WINTER, Locale.GERMAN));
            assertEquals("Mitteleurop\u00e4ische Sommerzeit", berlin.getName(TEST_TIME_SUMMER, Locale.GERMAN));
        } else {
            assertEquals("Zentraleurop\u00e4ische Zeit", berlin.getName(TEST_TIME_WINTER, Locale.GERMAN));
            assertEquals("Zentraleurop\u00e4ische Sommerzeit", berlin.getName(TEST_TIME_SUMMER, Locale.GERMAN));
        }
    }

@monperrus
Copy link
Collaborator Author

Google Guava is green again: https://ci.inria.fr/sos/job/Guava/1869/

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 23, 2021

Commons-lang is green again: https://ci.inria.fr/sos/job/Commons-lang/1871/ (the fix was to consider a newer commit)

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 23, 2021

Commons Codec is green again: https://ci.inria.fr/sos/job/Commons-codec/2251/

(the fix was to consider a newer commit which is jacoco-java11-compatible)

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 23, 2021

Commons Collections is green again: https://ci.inria.fr/sos/job/Commons-collections/2258/

(the fix was to consider a newer commit which is jacoco-java11-compatible)

@monperrus
Copy link
Collaborator Author

Dropwizard is green: https://ci.inria.fr/sos/job/Dropwizard/2255/

Had to fix the test environment for compiling and testing 2016 code today: spoon-bot/dropwizard@879f32c

@monperrus
Copy link
Collaborator Author

Mimecraft is green again (simply by setting the JVM to 11): https://ci.inria.fr/sos/job/Mimecraft/2242/

@monperrus
Copy link
Collaborator Author

monperrus commented Oct 23, 2021

Javawriter is green again: https://ci.inria.fr/sos/job/JavaWriter/2245/console

Fix:

  • disable errorprone compiler
  • remove failing tests on our JVM version

Reference: monperrus/javapoet@1d58d18

@monperrus
Copy link
Collaborator Author

Nopol is now green with Java 11:

@monperrus
Copy link
Collaborator Author

Dspot is green again, full Java 11: https://ci.inria.fr/sos/job/dspot/

@monperrus
Copy link
Collaborator Author

The whole CI infrastructure is now Java 11+, see Github Actions and https://ci.inria.fr/sos/.

Thus, we can close.

@slarse
Copy link
Collaborator

slarse commented Feb 2, 2022

That's a big milestone. Nicely done @monperrus .

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

No branches or pull requests

2 participants