@@ -28,6 +28,7 @@ import org.scalajs.linker.standard.MemIRFileImpl
28
28
import org .scalajs .linker .interface .LinkerOutput
29
29
import org .scalajs .linker .MemOutputFile
30
30
import java .util .concurrent .Executor
31
+ import scala .concurrent .ExecutionContext .Implicits .global
31
32
32
33
class JsModifier extends mdoc.PreModifier {
33
34
override val name = " js"
@@ -42,10 +43,6 @@ class JsModifier extends mdoc.PreModifier {
42
43
var reporter : mdoc.Reporter = new ConsoleReporter (System .out)
43
44
var gensym = new Gensym ()
44
45
45
- implicit val synchronousExecutionContext = ExecutionContext .fromExecutor(new Executor {
46
- def execute (task : Runnable ) = task.run()
47
- })
48
-
49
46
val sjsLogger : Logger = new Logger {
50
47
override def log (level : Level , message : => String ): Unit = {
51
48
if (level >= config.minLevel) {
@@ -167,7 +164,10 @@ class JsModifier extends mdoc.PreModifier {
167
164
" "
168
165
} else {
169
166
val output = MemOutputFile .apply()
170
- linker.link(virtualIrFiles ++ sjsir, Nil , LinkerOutput .apply(output), sjsLogger)
167
+
168
+ val linking = linker.link(virtualIrFiles ++ sjsir, Nil , LinkerOutput .apply(output), sjsLogger)
169
+ Await .result(linking, Duration .Inf )
170
+
171
171
ctx.settings.toInputFile(ctx.inputFile) match {
172
172
case None =>
173
173
ctx.reporter.error(
0 commit comments