steps
// build.sbt
lazy val s2 = project.in(file("s2"))
.settings(
scalaVersion := "2.13.16",
)
lazy val s3 = project.in(file("s3"))
.dependsOn(s2)
.settings(
scalaVersion := "3.8.0-RC1",
)
If we run show s3/fullClasspath, we get the following:
sbt:sbt-minim> show s3/fullClasspath
[info] * Attributed(.../s3/target/scala-3.8.0-RC1/classes)
[info] * Attributed(.../s2/target/scala-2.13/classes)
[info] * Attributed(.../.ivy2/local/org.scala-lang/scala3-library_3/3.8.0-RC1/jars/scala3-library_3.jar)
[info] * Attributed(.../Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.16/scala-library-2.13.16.jar)
[info] * Attributed(.../.ivy2/local/org.scala-lang/scala-library/3.8.0-RC1/jars/scala-library.jar)
problem
We should not have the scala 2.13.16 stdlib in the classpath, it should have been evicted in favor of the 3.8.0-RC1 stdlib.