-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Milestone
Description
Reproduction steps
Scala 2 version: 2.13.16
Scala 3 version: 3.6.3
-
Clone this minimum reproducability case repository:
https://github.com/jadenPete/scala-missing-from-classpath-bug-reproduction -
Run
sbt compile
-
Observe the following error:
[error] .../scala-missing-from-classpath-bug-reproduction/program/src/main/scala/Main.scala:8:18: Symbol 'type com.example.package.AnimalList' is missing from the classpath.
[error] This symbol is required by 'object com.example.Person'.
[error] Make sure that type AnimalList is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
[error] A full rebuild may help if 'Person.class' was compiled against an incompatible version of com.example.package.
[error] val mickey = Person(pets = List(goofy))
[error] ^
[error] one error found
Problem
Certain type aliases written in Scala 3 can't be transitively used by other Scala 2 targets (i.e. referenced in a Scala 2 target that, in turn, is depended on by another Scala 2 target). I'm not sure if this is specific to package objects, but something gets lost in translation when those Scala 3 type aliases are encoded in Scala 2's Pickle format instead of decoded directly from TASTy.