It's not necessarily required that the scala byte code matches the version of the java byte code.

By and large such inconsistencies are inevitable w.r.t. external libraries.

On 20/05/2022 12:23, Ran Tao wrote:
Hi, Martijn. Even if we upgrade scala to 2.12.15 to support Java17, it just
fix the compilation of FLINK-25000
<https://issues.apache.org/jira/browse/FLINK-25000> .  There is another
problem[1] that Scala <=2.13 can't generate jvm11 or higher bytecode
version. The flink project target class bytecode version is inconsistent
between scala and java source.
If we decide to upgrade scala version, how aboout scala 2.12.16, as i know
from scala community, the 2.12.16 will backport 2.13 functionilies like
jvm11,jvm17 target jvm class support.

[1] https://issues.apache.org/jira/browse/FLINK-27549

Martijn Visser <martijnvis...@apache.org> 于2022年5月20日周五 16:37写道:

Hi everyone,

I would like to get some opinions from our Scala users, therefore I'm also
looping in the user mailing list.

Flink currently is tied to Scala 2.12.7. As outlined in FLINK-12461 [1]
there is a binary incompatibility introduced by Scala 2.12.8, which
currently limits Flink from upgrading to a later Scala 2.12 version.
According to the Scala 2.12.8 release notes, "The fix is not binary
compatible: the 2.12.8 compiler omits certain methods that are generated by
earlier 2.12 compilers. However, we believe that these methods are never
used and existing compiled code will continue to work"

We could still consider upgrading to a later Scala 2.12 version, the latest
one currently being 2.12.15. Next to any benefits that are introduced in
the newer Scala versions, it would also resolve a blocker for Flink to add
support for Java 17 [2].

My question to Scala users of Flink and others who have an opinion on this:
* Has any of you already manually compiled Flink with Scala 2.12.8 or
later?
* If so, have you experienced any problems with checkpoint and/or savepoint
incompatibility?
* Would you prefer Flink breaking binary compatibility by upgrading to a
later Scala 2.12 version or would you prefer Flink to stick with Scala
2.12.7?

Note: I know there are also questions about Scala 2.13 and Scala 3 support
in Flink; I think that deserves its own discussion thread.

Best regards,

Martijn Visser
https://twitter.com/MartijnVisser82
https://github.com/MartijnVisser

[1] https://issues.apache.org/jira/browse/FLINK-12461
[2] https://issues.apache.org/jira/browse/FLINK-25000



Reply via email to