Skip to content

Commit

Permalink
Makes the jsbridge for 0.6 respect the runMain -> isTest repurposing.
Browse files Browse the repository at this point in the history
  • Loading branch information
KristianAN committed Dec 16, 2024
1 parent d20f024 commit 7cafb33
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object JsBridge {
config: JsConfig,
project: Project,
classpath: Array[Path],
runMain: java.lang.Boolean,
isTest: java.lang.Boolean,
mainClass: Option[String],
target: Path,
logger: BloopLogger,
Expand All @@ -87,8 +87,11 @@ object JsBridge {
val jarFiles = classpath.filter(isJarFile).map(toIrJar)
val scalajsIRFiles = jarFiles.flatMap(_.jar.sjsirFiles)
val initializers =
if (!runMain) Nil
else mainClass.map(cls => ModuleInitializer.mainMethodWithArgs(cls, "main")).toList
mainClass match {
case Some(value) => ModuleInitializer.mainMethodWithArgs(value, "main") :: Nil
case None => Nil // TODO check for isTest and setup tests
}

val jsConfig = StandardLinker
.Config()
.withOptimizer(enableOptimizer)
Expand Down

0 comments on commit 7cafb33

Please sign in to comment.