Skip to content

Commit

Permalink
remove internal validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Oct 26, 2024
1 parent 3beff49 commit 752bb11
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions cli/src/org/scalajs/cli/Scalajsld.scala
Original file line number Diff line number Diff line change
Expand Up @@ -282,24 +282,7 @@ object Scalajsld {
}
}

val wasEsModule = c.emitWasm match {
case true =>
if (c.moduleKind != ModuleKind.ESModule) {
failure("Wasm can only be emitted with module kind EsModule")
} else success
case false => success
}

val wasmFewestModules = c.emitWasm match {
case true => {
if (c.moduleSplitStyle != ModuleSplitStyle.FewestModules.toString) {
failure("Wasm can only be emitted with module split style FewestModules")
} else success
}
case false => success
}

val allValidations = Seq(outputCheck, importMapCheck, wasEsModule, wasmFewestModules)
val allValidations = Seq(outputCheck, importMapCheck)
allValidations.forall(_.isRight) match {
case true => success
case false => failure(allValidations.filter(_.isLeft).map(_.left.get).mkString("\n\n"))
Expand Down

0 comments on commit 752bb11

Please sign in to comment.