Reproduction steps
When we were preparing to upgrade the scala version from 2.13.13 to 2.13.14 in Spark, our maven plugin maven-enforcer-plugin found a problem, as follows:
Error: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.4.1:enforce (enforce-versions) on project spark-tools_2.13:
Error: Rule 3: org.codehaus.mojo.extraenforcer.dependencies.EnforceBytecodeVersion failed with message:
Error: Found Banned Dependency: org.jline:jline:jar:3.25.1
[INFO] Restricted to JDK 17 yet org.jline:jline:jar:3.25.1:compile contains org/jline/terminal/impl/ffm/CLibrary$termios.class targeted to 65.-257
The root cause is that the class org/jline/terminal/impl/ffm/CLibrary$termios.class in jline-3.25.1.jar that scala 2.13.14 depends on is compiled based on JDK21.
javap -verbose org/jline/terminal/impl/ffm/CLibrary$termios.class
Other classes in jline-3.25.1.jar seem normal, such as:
javap -verbose org/jline/utils/NonBlockingReaderImpl.class
Scala version: 2.13.14
Problem
Explain how the above behavior isn't what you expected.
So our scala 2.13.14 can only run on JDK21? Or is that a issue/bug ?
For details of problems encountered in upgrading, please refer to:
apache/spark#46288
Reproduction steps
When we were preparing to upgrade the
scala versionfrom2.13.13to2.13.14in Spark, our maven pluginmaven-enforcer-pluginfound a problem, as follows:The root cause is that the class
org/jline/terminal/impl/ffm/CLibrary$termios.classinjline-3.25.1.jarthatscala 2.13.14depends on is compiled based on JDK21.Other classes in
jline-3.25.1.jarseem normal, such as:Scala version: 2.13.14
Problem
Explain how the above behavior isn't what you expected.
So our
scala 2.13.14canonlyrun onJDK21? Or is that a issue/bug ?For details of problems encountered in upgrading, please refer to:
apache/spark#46288