mirror of https://github.com/sbt/sbt.git
**Problem** When scalaVersion is Scala 3.x and a dependency brings a newer scala3-library_3, sbt did not report an eviction error or warning. The compiler could be older than the standard library on the classpath, breaking compile-time alignment (e.g. scala/scala3#25406). **Solution** - In Compiler.scala, add an else if ScalaArtifacts.isScala3(sv) branch in scalaInstanceConfigFromUpdate that finds scala3-library_* on the Compile report and, if scalaVersion < that revision, fails (or warns when allowUnsafeScalaLibUpgrade := true) with the same pattern as the existing Scala 2.13 check (PR 7480). Message uses compile-time alignment wording and "See evicted to know why ... was upgraded from". - Set allowUnsafeScalaLibUpgrade := true on b3 in stdlib-unfreeze so existing b3/run and b3/checkScala still pass. - Add scripted tests: stdlib-unfreeze-scala3-eviction (expect compile to fail) and stdlib-unfreeze-scala3-warn (expect success with warning). Closes #6694 |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||