File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
sbt-dotty/src/dotty/tools/sbtplugin Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -269,11 +269,12 @@ object DottyPlugin extends AutoPlugin {
269
269
},
270
270
// ... instead, we'll fetch the compiler and its dependencies ourselves.
271
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
272
+ if (isDotty.value) dottyScalaInstance
273
+ else {
274
+ // This dereferences the Initialize graph, but keeps the Task unevaluated,
275
+ // so its effect gets fired only when isDotty.value evalutes to false. yay monad.
276
+ Def .valueStrict { scalaInstance.taskValue }
277
+ }
277
278
}.value,
278
279
dottyScalaInstance := {
279
280
val updateReport =
You can’t perform that action at this time.
0 commit comments