File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
sbt-dotty/src/dotty/tools/sbtplugin Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ object DottyPlugin extends AutoPlugin {
27
27
28
28
implicit class DottyCompatModuleID (moduleID : ModuleID ) {
29
29
/** If this ModuleID cross-version is a Dotty version, replace it
30
- * by the Scala 2.x version that the Dotty version is retro-compatible with.
30
+ * by the Scala 2.x version that the Dotty version is retro-compatible with,
31
+ * otherwise do nothing.
31
32
*
32
33
* This setting is useful when your build contains dependencies that have only
33
34
* been published with Scala 2.x, if you have:
@@ -46,10 +47,15 @@ object DottyPlugin extends AutoPlugin {
46
47
* Dotty is released, you should not rely on it.
47
48
*/
48
49
def withDottyCompat (): ModuleID =
49
- moduleID.cross(CrossVersion .binaryMapped {
50
- case version if version.startsWith(" 0." ) => " 2.11"
51
- case version => version
52
- })
50
+ moduleID.crossVersion match {
51
+ case _ : CrossVersion .Binary =>
52
+ moduleID.cross(CrossVersion .binaryMapped {
53
+ case version if version.startsWith(" 0." ) => " 2.11"
54
+ case version => version
55
+ })
56
+ case _ =>
57
+ moduleID
58
+ }
53
59
}
54
60
}
55
61
You can’t perform that action at this time.
0 commit comments