diff --git a/sbt-plugin/src/main/scala/org/scalajs/sbtplugin/ScalaJSPluginInternal.scala b/sbt-plugin/src/main/scala/org/scalajs/sbtplugin/ScalaJSPluginInternal.scala index 904b074791..3ea794b61f 100644 --- a/sbt-plugin/src/main/scala/org/scalajs/sbtplugin/ScalaJSPluginInternal.scala +++ b/sbt-plugin/src/main/scala/org/scalajs/sbtplugin/ScalaJSPluginInternal.scala @@ -123,7 +123,7 @@ private[sbtplugin] object ScalaJSPluginInternal { scalaJSLinkerBox in key := new CacheBox, - scalaJSLinker in key := { + scalaJSLinker in legacyKey := { val config = (scalaJSLinkerConfig in key).value val box = (scalaJSLinkerBox in key).value val linkerImpl = (scalaJSLinkerImpl in key).value @@ -131,7 +131,7 @@ private[sbtplugin] object ScalaJSPluginInternal { box.ensure(linkerImpl.clearableLinker(config)) }, - scalaJSLinker in legacyKey := (scalaJSLinker in key).value, + scalaJSLinker in key := (scalaJSLinker in legacyKey).value, // Have `clean` reset the state of the incremental linker clean in (This, Zero, This) := { @@ -140,7 +140,7 @@ private[sbtplugin] object ScalaJSPluginInternal { () }, - usesScalaJSLinkerTag in key := { + usesScalaJSLinkerTag in legacyKey := { val projectPart = thisProject.value.id val configPart = configuration.value.name @@ -152,7 +152,7 @@ private[sbtplugin] object ScalaJSPluginInternal { Tags.Tag(s"uses-scalajs-linker-$projectPart-$configPart-$stagePart") }, - usesScalaJSLinkerTag in legacyKey := (usesScalaJSLinkerTag in key).value, + usesScalaJSLinkerTag in key := (usesScalaJSLinkerTag in legacyKey).value, // Prevent this linker from being used concurrently concurrentRestrictions in Global += @@ -164,7 +164,7 @@ private[sbtplugin] object ScalaJSPluginInternal { scalaJSLinkerConfigFingerprint in key := StandardConfig.fingerprint((scalaJSLinkerConfig in key).value), - moduleName in legacyKey := (moduleName in key).value, + moduleName in key := (moduleName in legacyKey).value, key := Def.taskDyn { /* It is very important that we evaluate all of those `.value`s from @@ -309,7 +309,7 @@ private[sbtplugin] object ScalaJSPluginInternal { scalaJSStageSettings(Stage.FastOpt, linkJSDev, fastOptJS) ++ scalaJSStageSettings(Stage.FullOpt, linkJSProd, fullOptJS) ) ++ ( - Seq(linkJSDev, linkJSProd).map { key => + Seq(fastOptJS, fullOptJS).map { key => moduleName in key := { val configSuffix = configuration.value match { case Compile => "" @@ -410,7 +410,7 @@ private[sbtplugin] object ScalaJSPluginInternal { ((crossTarget in fullOptJS).value / ((moduleName in fullOptJS).value + "-opt.js")), - scalaJSLinkerConfig in linkJSProd ~= { prevConfig => + scalaJSLinkerConfig in fullOptJS ~= { prevConfig => val useClosure = prevConfig.moduleKind != ModuleKind.ESModule prevConfig .withSemantics(_.optimized) @@ -418,6 +418,9 @@ private[sbtplugin] object ScalaJSPluginInternal { .withCheckIR(true) // for safety, fullOpt is slow anyways. }, + scalaJSLinkerConfig in linkJSDev := (scalaJSLinkerConfig in fastOptJS).value, + scalaJSLinkerConfig in linkJSProd := (scalaJSLinkerConfig in fullOptJS).value, + scalaJSLinkerResult := Def.settingDyn { scalaJSStage.value match { case Stage.FastOpt => linkJSDev diff --git a/test-suite-linker/src/main/scala/org/scalajs/bootstrap/TestSuiteLinker.scala b/test-suite-linker/src/main/scala/org/scalajs/bootstrap/TestSuiteLinker.scala index c62c05970a..a307b34bee 100644 --- a/test-suite-linker/src/main/scala/org/scalajs/bootstrap/TestSuiteLinker.scala +++ b/test-suite-linker/src/main/scala/org/scalajs/bootstrap/TestSuiteLinker.scala @@ -52,7 +52,7 @@ object QuickLinker { @JSImport("fs", "promises") @js.native - object PromisesFS extends js.Object { + private object PromisesFS extends js.Object { def writeFile(path: String, data: Uint8Array): js.Promise[Unit] = js.native } } diff --git a/test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/ExportsTest.scala b/test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/ExportsTest.scala index 2b54deecc0..d9195f45bd 100644 --- a/test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/ExportsTest.scala +++ b/test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/ExportsTest.scala @@ -1472,7 +1472,7 @@ class ExportsTest { } } - @Test def top_level_export_field_is_writiable_accross_modules(): Unit = { + @Test def top_level_export_field_is_writable_accross_modules(): Unit = { /* We write to basicVar exported above from a different object to test writing * of static fields accross module boundaries (when module splitting is * enabled).