File tree 2 files changed +18
-3
lines changed
sbt-dotty/src/dotty/tools/sbtplugin
2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,14 @@ object Build {
62
62
val referenceVersion = " 0.15.0-RC1"
63
63
64
64
val baseVersion = " 0.16.0"
65
- val baseSbtDottyVersion = " 0.3.2 "
65
+ val baseSbtDottyVersion = " 0.3.3 "
66
66
67
67
// Versions used by the vscode extension to create a new project
68
68
// This should be the latest published releases.
69
69
// TODO: Have the vscode extension fetch these numbers from the Internet
70
70
// instead of hardcoding them ?
71
- val publishedDottyVersion = " 0.13.0-RC1 "
72
- val publishedSbtDottyVersion = " 0.3.1 "
71
+ val publishedDottyVersion = referenceVersion
72
+ val publishedSbtDottyVersion = " 0.3.2 "
73
73
74
74
75
75
val dottyOrganization = " ch.epfl.lamp"
Original file line number Diff line number Diff line change @@ -234,6 +234,21 @@ object DottyPlugin extends AutoPlugin {
234
234
// bootclasspath, and instead have scala-library and dotty-library on the
235
235
// compiler classpath. This means that user code could shadow symbols
236
236
// from these jars but we can live with that for now.
237
+
238
+ // sbt crazy scoping rules mean that when we override `classpathOptions`
239
+ // below we also override `classpathOptions in console` which is normally
240
+ // set in https://github.com/sbt/sbt/blob/b6f02b9b8cd0abb15e3d8856fd76b570deb1bd61/main/src/main/scala/sbt/Defaults.scala#L503,
241
+ // this breaks `sbt console` in Scala 2 projects.
242
+ // There seems to be no way to avoid stomping over task-scoped settings,
243
+ // so we need to manually set `classpathOptions in console` to something sensible,
244
+ // ideally this would be "whatever would be set if this plugin was not enabled",
245
+ // but I can't find a way to do this, so we default to whatever is set in ThisBuild.
246
+ classpathOptions in console := {
247
+ if (isDotty.value)
248
+ classpathOptions.value // The Dotty REPL doesn't require anything special on its classpath
249
+ else
250
+ (classpathOptions in console in ThisBuild ).value
251
+ },
237
252
classpathOptions := {
238
253
val old = classpathOptions.value
239
254
if (isDotty.value)
You can’t perform that action at this time.
0 commit comments