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

Scala 2.12.11 and 2.13.2 #1212

Merged
merged 5 commits into from
Oct 12, 2020
Merged

Scala 2.12.11 and 2.13.2 #1212

merged 5 commits into from
Oct 12, 2020

Conversation

ennru
Copy link
Member

@ennru ennru commented Oct 7, 2020

This makes Scala 2.13.2 the default version for all modules.

@ennru ennru added this to the 2.1.0 milestone Oct 7, 2020
@@ -91,7 +91,7 @@ val commonSettings = Def.settings(
licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0")),
description := "Alpakka is a Reactive Enterprise Integration library for Java and Scala, based on Reactive Streams and Akka.",
crossScalaVersions := Seq(Scala212, Scala213),
scalaVersion := Scala212,
scalaVersion := Scala213,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sneaky!

@ennru
Copy link
Member Author

ennru commented Oct 7, 2020

Oh wow, Kafka hits Scala binary compatibility issues as it looks to me

[info]   java.lang.NoClassDefFoundError: scala/math/Ordering$$anon$7
[info]   at kafka.api.ApiVersion$.orderingByVersion(ApiVersion.scala:45)
[info]   at kafka.api.ApiVersion.compare(ApiVersion.scala:141)
[info]   at kafka.api.ApiVersion.compare$(ApiVersion.scala:140)
[info]   at kafka.api.KAFKA_2_6_IV0$.compare(ApiVersion.scala:348)
[info]   at kafka.api.KAFKA_2_6_IV0$.compare(ApiVersion.scala:348)
[info]   at scala.math.Ordered.$greater$eq(Ordered.scala:91)

https://travis-ci.org/github/akka/alpakka-kafka/jobs/733600592#L654

@ennru
Copy link
Member Author

ennru commented Oct 10, 2020

The error occurs in EmbeddedKafka on Scala 2.12.12 (Scala 2.13.3 works)
https://travis-ci.org/github/akka/alpakka-kafka/jobs/734533513#L443

@ennru
Copy link
Member Author

ennru commented Oct 12, 2020

The Kafka broker itself is compiled against Scala 2.12.11 (https://mvnrepository.com/artifact/org.apache.kafka/kafka_2.12/2.6.0).

@lrytz
Copy link

lrytz commented Oct 12, 2020

Seems there is a broken assumption here

Inline more aggressively when compiling the core jar since it's not meant to be used as a library [...] This is only safe if the Scala library version is the same at compile time and runtime

    if (project.name.equals('core'))
      inlineFrom = ["-opt-inline-from:scala.**", "-opt-inline-from:kafka.**", "-opt-inline-from:org.apache.kafka.**"]

https://github.com/apache/kafka/blob/2.6.0/build.gradle#L485-L492

@ennru ennru changed the title Scala 2.12.12 and 2.13.3 Scala 2.12.11 and 2.13.2 Oct 12, 2020
@ennru
Copy link
Member Author

ennru commented Oct 12, 2020

Rolled back this PR to Scala 2.12.11 and 2.13.2 so we can continue dropping Embedded Kafka in #1209

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

Successfully merging this pull request may close these issues.

3 participants