We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9fc4a3 commit c1aec9cCopy full SHA for c1aec9c
sbt-dotty/src/dotty/tools/sbtplugin/DottyPlugin.scala
@@ -269,11 +269,12 @@ object DottyPlugin extends AutoPlugin {
269
},
270
// ... instead, we'll fetch the compiler and its dependencies ourselves.
271
scalaInstance := Def.taskDyn {
272
- val isD = isDotty.value
273
- val si = scalaInstance.taskValue
274
- val siTaskInitialize = Def.valueStrict { si }
275
- if (isD) dottyScalaInstance
276
- else siTaskInitialize
+ if (isDotty.value) dottyScalaInstance
+ else {
+ // This dereferences the Initialize graph, but keeps the Task unevaluated,
+ // so its effect gets fired only when isDotty.value evalutes to false. yay monad.
+ Def.valueStrict { scalaInstance.taskValue }
277
+ }
278
}.value,
279
dottyScalaInstance := {
280
val updateReport =
0 commit comments