Skip to content

Commit 6e28fee

Browse files
committed
Fix race condition in scripted
These `publishLocal` calls should be run _before_ `scriptedTask`, but before this commit they were run in parallel, leading to horrible failures.
1 parent b822cb0 commit 6e28fee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

project/Build.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,16 +702,15 @@ object Build {
702702
ScriptedPlugin.sbtTestDirectory := baseDirectory.value / "sbt-test",
703703
ScriptedPlugin.scriptedLaunchOpts := Seq("-Xmx1024m"),
704704
ScriptedPlugin.scriptedBufferLog := false,
705-
ScriptedPlugin.scripted := {
705+
ScriptedPlugin.scripted := ScriptedPlugin.scripted.dependsOn(Def.task {
706706
val x0 = (publishLocal in `dotty-sbt-bridge-bootstrapped`).value
707707
val x1 = (publishLocal in `dotty-interfaces`).value
708708
val x2 = (publishLocal in `dotty-compiler-bootstrapped`).value
709709
val x3 = (publishLocal in `dotty-library-bootstrapped`).value
710710
val x4 = (publishLocal in `scala-library`).value
711711
val x5 = (publishLocal in `scala-reflect`).value
712712
val x6 = (publishLocal in `dotty-bootstrapped`).value // Needed because sbt currently hardcodes the dotty artifact
713-
ScriptedPlugin.scriptedTask.evaluated
714-
}
713+
}).evaluated
715714
// TODO: Use this instead of manually copying DottyInjectedPlugin.scala
716715
// everywhere once https://github.com/sbt/sbt/issues/2601 gets fixed.
717716
/*,

0 commit comments

Comments
 (0)