Skip to content

Commit f36c1f2

Browse files
Merge pull request #10118 from dotty-staging/withDottyCompat-old-dotty
withDottyCompat: correctly handle dotty-{library,compiler}
2 parents e080d00 + caf28eb commit f36c1f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,17 @@ object DottyPlugin extends AutoPlugin {
9393
* with Dotty this will change the cross-version to a Scala 2.x one. This
9494
* works because Dotty is currently retro-compatible with Scala 2.x.
9595
*
96-
* NOTE: As a special-case, the cross-version of dotty-library, dotty-compiler and
97-
* dotty will never be rewritten because we know that they're Dotty-only.
96+
* NOTE: As a special-case, the cross-version of scala3-library and scala3-compiler
97+
* will never be rewritten because we know that they're Scala 3 only.
9898
* This makes it possible to do something like:
9999
* {{{
100100
* libraryDependencies ~= (_.map(_.withDottyCompat(scalaVersion.value)))
101101
* }}}
102102
*/
103103
def withDottyCompat(scalaVersion: String): ModuleID = {
104104
val name = moduleID.name
105-
if (name != "scala3" && name != "scala3-library" && name != "scala3-compiler")
105+
if (name != "scala3-library" && name != "scala3-compiler" &&
106+
name != "dotty" && name != "dotty-library" && name != "dotty-compiler")
106107
moduleID.crossVersion match {
107108
case binary: librarymanagement.Binary =>
108109
val compatVersion =

0 commit comments

Comments
 (0)