diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90bfa004..51bcb420 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: run: sbt '++ ${{ matrix.scala }}' test - name: Compress target directories - run: tar cf targets.tar target core/native/target localesMinimalEnUSDb/native/target localesFullCurrenciesDb/target macroutils/target core/js/target core/jvm/target tests/js/target localesFullDb/.js/target localesFullDb/.native/target localesMinimalEnUSDb/js/target tests/jvm/target demo/native/target localesMinimalEnDb/native/target localesMinimalEnDb/js/target tests/native/target demo/js/target project/target + run: tar cf targets.tar target localesFullCurrenciesDb/js/target core/native/target localesMinimalEnUSDb/native/target macroutils/target core/js/target localesFullCurrenciesDb/native/target core/jvm/target tests/js/target localesFullDb/.js/target localesFullDb/.native/target localesMinimalEnUSDb/js/target tests/jvm/target demo/native/target localesMinimalEnDb/native/target localesMinimalEnDb/js/target tests/native/target demo/js/target project/target - name: Upload target directories uses: actions/upload-artifact@v4 diff --git a/build.sbt b/build.sbt index 596d09c1..99b5ab6a 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ import locales._ import sbt.Keys._ import sbtcrossproject.CrossPlugin.autoImport.{ CrossType, crossProject } -lazy val cldrApiVersion = "4.4.0" +lazy val cldrApiVersion = "4.5.0" ThisBuild / versionScheme := Some("always") @@ -87,7 +87,8 @@ lazy val root = project tests.native, localesFullDb.js, localesFullDb.native, - localesFullCurrenciesDb, + localesFullCurrenciesDb.js, + localesFullCurrenciesDb.native, localesMinimalEnDb.js, localesMinimalEnDb.native, localesMinimalEnUSDb.js, @@ -133,14 +134,16 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) } } ) + .nativeSettings { + scalacOptions += "-P:scalanative:genStaticForwardersForNonTopLevelObjects" + } lazy val cldrDbVersion = "36.0" -lazy val localesFullCurrenciesDb = project +lazy val localesFullCurrenciesDb = crossProject(JSPlatform, NativePlatform) .in(file("localesFullCurrenciesDb")) .settings(commonSettings) .configure(_.enablePlugins(LocalesPlugin)) - .configure(_.enablePlugins(ScalaJSPlugin)) .settings( name := "locales-full-currencies-db", cldrVersion := CLDRVersion.Version(cldrDbVersion), @@ -151,7 +154,7 @@ lazy val localesFullCurrenciesDb = project supportDateTimeFormats := true, supportNumberFormats := true, supportISOCodes := true, - libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2") + libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3") .cross(CrossVersion.for3Use2_13) ) @@ -170,7 +173,7 @@ lazy val localesFullDb = crossProject(JSPlatform, NativePlatform) supportDateTimeFormats := true, supportNumberFormats := true, supportISOCodes := true, - libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2") + libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3") .cross(CrossVersion.for3Use2_13) ) @@ -188,7 +191,7 @@ lazy val localesMinimalEnDb = crossProject(JSPlatform, NativePlatform) supportDateTimeFormats := true, supportNumberFormats := true, supportISOCodes := false, - libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2") + libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3") .cross(CrossVersion.for3Use2_13) ) @@ -206,7 +209,7 @@ lazy val localesMinimalEnUSDb = crossProject(JSPlatform, NativePlatform) supportDateTimeFormats := true, supportNumberFormats := true, supportISOCodes := false, - libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2") + libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3") .cross(CrossVersion.for3Use2_13) ) @@ -228,7 +231,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform) .jsSettings(Test / parallelExecution := false, scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule)) ) - .jsConfigure(_.dependsOn(core.js, macroutils, localesFullCurrenciesDb)) + .jsConfigure(_.dependsOn(core.js, macroutils, localesFullCurrenciesDb.js)) .jvmSettings( // Fork the JVM test to ensure that the custom flags are set Test / fork := true, @@ -245,14 +248,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform) Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat ) .jvmConfigure(_.dependsOn(macroutils)) - .nativeSettings( - nativeConfig ~= { - _.withOptimize(false) - // tests fail to link on Scala 2.11 and 2.12 in debug mode - // with the optimizer enabled - } - ) - .nativeConfigure(_.dependsOn(core.native, macroutils, localesFullDb.native)) + .nativeConfigure(_.dependsOn(core.native, macroutils, localesFullCurrenciesDb.native)) .platformsSettings(JSPlatform, NativePlatform)( Test / unmanagedSourceDirectories += baseDirectory.value.getParentFile / "js-native" / "src" / "test" / "scala" ) diff --git a/core/native/src/main/scala/locales/NormalizerImpl.scala b/core/native/src/main/scala/locales/NormalizerImpl.scala index ed80a935..e76dfd0c 100644 --- a/core/native/src/main/scala/locales/NormalizerImpl.scala +++ b/core/native/src/main/scala/locales/NormalizerImpl.scala @@ -13,7 +13,7 @@ private object NormalizerImpl { if (src == null || form == null) throw new NullPointerException else - Zone { implicit z => + Zone.acquire { implicit z => import Form._ import utf8proc._ diff --git a/project/plugins.sbt b/project/plugins.sbt index b4c3521c..c8b70699 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,9 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("io.github.cquiroz" % "sbt-locales" % "4.4.0") +addSbtPlugin("io.github.cquiroz" % "sbt-locales" % "4.5.0") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0") -