Search code examples
scalasbtscala-3

Using a Scala 3 Library in a Scala 2.13 Project


I try to use my Scala 3 Library in my Scala 2.13 Project.

I get the following exception:

(class scala.tools.tasty.UnpickleException/TASTy signature has wrong version.
 expected: {majorVersion: 28, minorVersion: 0}
 found   : {majorVersion: 28, minorVersion: 1}

The library uses Scala 3.1. The Project uses Scala 2.13.6, with this dependency:

libraryDependencies += ("io.github.pme123" %% "camundala-api" % "0.1.6").cross(CrossVersion.for2_13Use3)

How can I resolve this? I could not find a Compatibility Matrix. My guess is that when using Scala 3.0. in the library it would work.


Solution

  • As mentioned by @Jasper-M, the TASTy reader was updated in Scala 2.13.7 to work with Scala 3.1. Here is the release note where it was mentioned.

    So:

    • Scala 2.13.7 works with Scala 3.1
    • Scala 2.13.6 works with Scala 3.0