File tree 3 files changed +11
-7
lines changed
sbt-dotty/src/dotty/tools/sbtplugin
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ object Build {
40
40
val dottyOrganization = " ch.epfl.lamp"
41
41
val dottyGithubUrl = " https://github.com/lampepfl/dotty"
42
42
val dottyVersion = {
43
- val baseVersion = " 0.3.0-RC1 "
43
+ val baseVersion = " 0.4.0 "
44
44
val isNightly = sys.env.get(" NIGHTLYBUILD" ) == Some (" yes" )
45
45
val isRelease = sys.env.get(" RELEASEBUILD" ) == Some (" yes" )
46
46
if (isNightly)
Original file line number Diff line number Diff line change @@ -249,6 +249,6 @@ object DottyIDEPlugin extends AutoPlugin {
249
249
}
250
250
}
251
251
}
252
-
252
+
253
253
) ++ addCommandAlias(" launchIDE" , " ;configureIDE;runCode" )
254
254
}
Original file line number Diff line number Diff line change @@ -50,11 +50,15 @@ object DottyPlugin extends AutoPlugin {
50
50
def withDottyCompat (): ModuleID =
51
51
moduleID.crossVersion match {
52
52
case _ : CrossVersion .Binary =>
53
- moduleID.cross(CrossVersion .binaryMapped {
54
- // TODO: this will break on release of >= 0.4
55
- case version if version.startsWith(" 0.3" ) => " 2.12"
56
- case version if version.startsWith(" 0." ) => " 2.11"
57
- case version => version
53
+ moduleID.cross(CrossVersion .binaryMapped { version =>
54
+ CrossVersion .partialVersion(version) match {
55
+ case Some ((0 , minor)) =>
56
+ // Dotty v0.4 or greater is compatible with 2.12.x
57
+ if (minor >= 4 ) " 2.12"
58
+ else " 2.11"
59
+ case _ =>
60
+ version
61
+ }
58
62
})
59
63
case _ =>
60
64
moduleID
You can’t perform that action at this time.
0 commit comments