Skip to content

Commit 2b6417b

Browse files
committed
Handle the prefix and suffix of CrossVersions in withDottyCompat.
This allows `withDottyCompat` to work for Scala.js dependencies, for example.
1 parent 80b1fd3 commit 2b6417b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ object DottyPlugin extends AutoPlugin {
9393
val name = moduleID.name
9494
if (name != "dotty" && name != "dotty-library" && name != "dotty-compiler")
9595
moduleID.crossVersion match {
96-
case _: librarymanagement.Binary =>
96+
case binary: librarymanagement.Binary =>
9797
val compatVersion =
9898
CrossVersion.partialVersion(scalaVersion) match {
9999
case Some((3, _)) =>
@@ -107,7 +107,7 @@ object DottyPlugin extends AutoPlugin {
107107
""
108108
}
109109
if (compatVersion.nonEmpty)
110-
moduleID.cross(CrossVersion.constant(compatVersion))
110+
moduleID.cross(CrossVersion.constant(binary.prefix + compatVersion + binary.suffix))
111111
else
112112
moduleID
113113
case _ =>

0 commit comments

Comments
 (0)