Opened 5 weeks ago

Closed 3 weeks ago

#31194 closed enhancement (wontfix)

Upgrade metrics-lib to Debian buster libraries

Reported by: karsten Owned by: metrics-team
Priority: Medium Milestone:
Component: Metrics/Library Version:
Severity: Normal Keywords:
Cc: metrics-team Actual Points:
Parent ID: #31193 Points:
Reviewer: irl Sponsor:

Description

I already updated most libraries in metrics-base and metrics-lib master to Debian buster for #31172 to fix the Jenkins build. We should review those changes anyway, which is why I'm creating this ticket. Commits are:

We'll also have to resolve an issue with the latest Checkstyle version 8.15 ("Unable to create Root Module"). I don't really know how to start debugging this, so I'll leave this for others for now.

Child Tickets

Change History (8)

comment:1 Changed 5 weeks ago by karsten

Reviewer: irl
Status: newneeds_review

Setting to needs_review for the review part, though we'll also have to address the Checkstyle thing before resolving this ticket.

comment:2 Changed 5 weeks ago by irl

Status: needs_reviewmerge_ready

The two commits look good, all the versions match up with what I see as the versions in Debian stable.

The jar for cobertura looks like it is called "cobertura-annotations-api-2.1.1.jar" but I've never actually got that to work so I don't know if that's the same jar or not.

The installed paths look like:

/usr/share/java/asm4-5.0.4.jar
/usr/share/java/asm4-analysis-5.0.4.jar
/usr/share/java/asm4-commons-5.0.4.jar
/usr/share/java/asm4-tree-5.0.4.jar
/usr/share/java/asm4-util-5.0.4.jar
/usr/share/java/checkstyle-8.15.jar
/usr/share/java/cobertura-annotations-api-2.1.1.jar
/usr/share/java/commons-codec-1.11.jar
/usr/share/java/commons-compress-1.18.jar
/usr/share/java/commons-lang3-3.8.jar
/usr/share/java/hamcrest-all-1.3.jar
/usr/share/java/jackson-annotations-2.9.8.jar
/usr/share/java/jackson-core-2.9.8.jar
/usr/share/java/jackson-databind-2.9.8.jar
/usr/share/java/junit4-4.12.jar
/usr/share/java/logback-classic-1.2.3.jar
/usr/share/java/logback-core-1.2.3.jar
/usr/share/java/oro-2.0.8.jar
/usr/share/java/slf4j-api-1.7.25.jar
/usr/share/java/xz-1.8.jar

and then I just symlink these into the lib directory.

I had a go at using the latest checkstyle, but I also hit the same "unable to create root module" error. That might need more digging than we have time for right now.

comment:3 in reply to:  2 Changed 5 weeks ago by karsten

Replying to irl:

The two commits look good, all the versions match up with what I see as the versions in Debian stable.

Okay, great, I'll move forward with upgrading our other code bases then.

The jar for cobertura looks like it is called "cobertura-annotations-api-2.1.1.jar" but I've never actually got that to work so I don't know if that's the same jar or not.

Hmm, I can see two .jar files in the `libcobertura-java` package. Why do you think that we need this one, not the other?

And why did you never get that to work? Does ant coverage not generate a report at generated/coverage-report/index.html for you?

The installed paths look like:

[...]

and then I just symlink these into the lib directory.

That should work, yes.

I had a go at using the latest checkstyle, but I also hit the same "unable to create root module" error. That might need more digging than we have time for right now.

Let's tackle this one in the other ticket and close this ticket as soon as we have resolved the Cobertura questions above.

comment:4 Changed 5 weeks ago by irl

You're right, it is /usr/share/java/cobertura-2.1.1.jar but for some reason I didn't have that file in my system. An apt remove and apt install later and it was back, and now ant coverage does something that looks more like expected.

[cobertura-report] Cobertura 2.1.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
[cobertura-report] Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/oro/text/regex/MalformedPatternException has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[cobertura-report] 	at java.lang.ClassLoader.defineClass1(Native Method)
[cobertura-report] 	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
[cobertura-report] 	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[cobertura-report] 	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
[cobertura-report] 	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
[cobertura-report] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
[cobertura-report] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
[cobertura-report] 	at java.security.AccessController.doPrivileged(Native Method)
[cobertura-report] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
[cobertura-report] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[cobertura-report] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
[cobertura-report] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[cobertura-report] 	at net.sourceforge.cobertura.dsl.Cobertura.<init>(Cobertura.java:61)
[cobertura-report] 	at net.sourceforge.cobertura.reporting.ReportMain.parseArgumentsAndReport(ReportMain.java:91)
[cobertura-report] 	at net.sourceforge.cobertura.reporting.ReportMain.generateReport(ReportMain.java:141)
[cobertura-report] 	at net.sourceforge.cobertura.reporting.ReportMain.main(ReportMain.java:151)

...but it fails

comment:5 Changed 5 weeks ago by karsten

Hmm, random thought: can you try installing a newer Java version (as in: JRE, java command, not necessarily JDK/javac)? In theory, it shouldn't hurt to use a newer Java version, because we're still building for 1.8 compatibility in src/build/java/base.xml. Maybe you could do the upgrade in a way that allows a downgrade again, just in case this wasn't it.

comment:6 Changed 5 weeks ago by karsten

Resolution: fixed
Status: merge_readyclosed

Alright, I merged changes into metrics-lib master and created #31233 for the Cobertura issue which isn't really related to this ticket. Closing. Thanks!

comment:7 Changed 4 weeks ago by karsten

Resolution: fixed
Status: closedreopened

As discussed on Thursday, I reverted these changes, because it turned out that updating dependencies manually doesn't scale anymore. We'll have to find another solution for all our code bases.

comment:8 Changed 3 weeks ago by karsten

Resolution: wontfix
Status: reopenedclosed

Closing all tickets related to Debian buster libraries, now that we're using Apache Ivy for external dependency management.

Note: See TracTickets for help on using tickets.