@@ -209,32 +209,31 @@ class ScalaJSWorkerImpl extends ScalaJSWorkerApi {
209
209
irFiles = if (esModuleMap.isEmpty) {
210
210
irFiles0
211
211
} else {
212
- val remapFct = esModuleMap.toSeq.foldLeft((in : String ) => in){ case (fct, (s1, s2)) =>
213
- val fct2 : (String => String ) = (in => in.replace(s1, s2))
214
- (in => fct(fct2(in)))
215
- }
216
- irFiles0.map{ImportMappedIRFile .fromIRFile(_)(remapFct)
212
+ val remapFct = esModuleMap.toSeq.foldLeft((in : String ) => in) { case (fct, (s1, s2)) =>
213
+ val fct2 : (String => String ) = (in => in.replace(s1, s2))
214
+ (in => fct(fct2(in)))
217
215
}
216
+ irFiles0.map { ImportMappedIRFile .fromIRFile(_)(remapFct) }
218
217
}
219
218
report <-
220
219
if (useLegacy) {
221
- // This uses the legacy linker interface, which is deprecated. The compiler will warn us about it, but the warnings are intentional in a legacy block. Suppress them.
220
+ // This uses the legacy linker interface, which is deprecated. The compiler will warn us about it, but the warnings are intentional in a legacy block. Suppress them.
222
221
val jsFileName = " out.js"
223
222
val jsFile = new File (dest, jsFileName).toPath()
224
- @ annotation.nowarn
225
- var linkerOutput = LinkerOutput (PathOutputFile (jsFile))
223
+ @ annotation.nowarn
224
+ var linkerOutput = LinkerOutput (PathOutputFile (jsFile))
226
225
.withJSFileURI(java.net.URI .create(jsFile.getFileName.toString))
227
-
226
+
228
227
val sourceMapNameOpt = Option .when(sourceMap)(s " ${jsFile.getFileName}.map " )
229
- sourceMapNameOpt.foreach { sourceMapName =>
228
+ sourceMapNameOpt.foreach { sourceMapName =>
230
229
val sourceMapFile = jsFile.resolveSibling(sourceMapName)
231
- @ annotation.nowarn
230
+ @ annotation.nowarn
232
231
val outFct = PathOutputFile (sourceMapFile)
233
232
linkerOutput = linkerOutput
234
- .withSourceMap( outFct )
233
+ .withSourceMap(outFct)
235
234
.withSourceMapURI(java.net.URI .create(sourceMapFile.getFileName.toString))
236
- }
237
- @ annotation.nowarn
235
+ }
236
+ @ annotation.nowarn
238
237
val report = linker.link(irFiles, moduleInitializers, linkerOutput, logger).map {
239
238
file =>
240
239
Report (
@@ -290,7 +289,7 @@ class ScalaJSWorkerImpl extends ScalaJSWorkerApi {
290
289
else runConfig0
291
290
.withInheritErr(false )
292
291
.withInheritOut(false )
293
- .withOnOutputStream {
292
+ .withOnOutputStream {
294
293
case (Some (processOut), Some (processErr)) =>
295
294
val sources = Seq (
296
295
(processOut, System .out, " spawnSubprocess.stdout" , false , () => true ),
0 commit comments