Skip to content

Commit 4eb27b9

Browse files
authored
Merge pull request #491 from sideeffffect/scala-native-0.5.x
Scala Native 0.5.x
2 parents c3c1787 + 0304c11 commit 4eb27b9

File tree

4 files changed

+17
-22
lines changed

4 files changed

+17
-22
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
run: sbt '++ ${{ matrix.scala }}' test
6060

6161
- name: Compress target directories
62-
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
62+
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
6363

6464
- name: Upload target directories
6565
uses: actions/upload-artifact@v4

build.sbt

+13-17
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import locales._
22
import sbt.Keys._
33
import sbtcrossproject.CrossPlugin.autoImport.{ CrossType, crossProject }
44

5-
lazy val cldrApiVersion = "4.4.0"
5+
lazy val cldrApiVersion = "4.5.0"
66

77
ThisBuild / versionScheme := Some("always")
88

@@ -87,7 +87,8 @@ lazy val root = project
8787
tests.native,
8888
localesFullDb.js,
8989
localesFullDb.native,
90-
localesFullCurrenciesDb,
90+
localesFullCurrenciesDb.js,
91+
localesFullCurrenciesDb.native,
9192
localesMinimalEnDb.js,
9293
localesMinimalEnDb.native,
9394
localesMinimalEnUSDb.js,
@@ -133,14 +134,16 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
133134
}
134135
}
135136
)
137+
.nativeSettings {
138+
scalacOptions += "-P:scalanative:genStaticForwardersForNonTopLevelObjects"
139+
}
136140

137141
lazy val cldrDbVersion = "36.0"
138142

139-
lazy val localesFullCurrenciesDb = project
143+
lazy val localesFullCurrenciesDb = crossProject(JSPlatform, NativePlatform)
140144
.in(file("localesFullCurrenciesDb"))
141145
.settings(commonSettings)
142146
.configure(_.enablePlugins(LocalesPlugin))
143-
.configure(_.enablePlugins(ScalaJSPlugin))
144147
.settings(
145148
name := "locales-full-currencies-db",
146149
cldrVersion := CLDRVersion.Version(cldrDbVersion),
@@ -151,7 +154,7 @@ lazy val localesFullCurrenciesDb = project
151154
supportDateTimeFormats := true,
152155
supportNumberFormats := true,
153156
supportISOCodes := true,
154-
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2")
157+
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3")
155158
.cross(CrossVersion.for3Use2_13)
156159
)
157160

@@ -170,7 +173,7 @@ lazy val localesFullDb = crossProject(JSPlatform, NativePlatform)
170173
supportDateTimeFormats := true,
171174
supportNumberFormats := true,
172175
supportISOCodes := true,
173-
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2")
176+
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3")
174177
.cross(CrossVersion.for3Use2_13)
175178
)
176179

@@ -188,7 +191,7 @@ lazy val localesMinimalEnDb = crossProject(JSPlatform, NativePlatform)
188191
supportDateTimeFormats := true,
189192
supportNumberFormats := true,
190193
supportISOCodes := false,
191-
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2")
194+
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3")
192195
.cross(CrossVersion.for3Use2_13)
193196
)
194197

@@ -206,7 +209,7 @@ lazy val localesMinimalEnUSDb = crossProject(JSPlatform, NativePlatform)
206209
supportDateTimeFormats := true,
207210
supportNumberFormats := true,
208211
supportISOCodes := false,
209-
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2")
212+
libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3")
210213
.cross(CrossVersion.for3Use2_13)
211214
)
212215

@@ -228,7 +231,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
228231
.jsSettings(Test / parallelExecution := false,
229232
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule))
230233
)
231-
.jsConfigure(_.dependsOn(core.js, macroutils, localesFullCurrenciesDb))
234+
.jsConfigure(_.dependsOn(core.js, macroutils, localesFullCurrenciesDb.js))
232235
.jvmSettings(
233236
// Fork the JVM test to ensure that the custom flags are set
234237
Test / fork := true,
@@ -245,14 +248,7 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform)
245248
Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat
246249
)
247250
.jvmConfigure(_.dependsOn(macroutils))
248-
.nativeSettings(
249-
nativeConfig ~= {
250-
_.withOptimize(false)
251-
// tests fail to link on Scala 2.11 and 2.12 in debug mode
252-
// with the optimizer enabled
253-
}
254-
)
255-
.nativeConfigure(_.dependsOn(core.native, macroutils, localesFullDb.native))
251+
.nativeConfigure(_.dependsOn(core.native, macroutils, localesFullCurrenciesDb.native))
256252
.platformsSettings(JSPlatform, NativePlatform)(
257253
Test / unmanagedSourceDirectories += baseDirectory.value.getParentFile / "js-native" / "src" / "test" / "scala"
258254
)

core/native/src/main/scala/locales/NormalizerImpl.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private object NormalizerImpl {
1313
if (src == null || form == null)
1414
throw new NullPointerException
1515
else
16-
Zone { implicit z =>
16+
Zone.acquire { implicit z =>
1717
import Form._
1818
import utf8proc._
1919

project/plugins.sbt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
22
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
33
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
4-
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
4+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.2")
55
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
6-
addSbtPlugin("io.github.cquiroz" % "sbt-locales" % "4.4.0")
6+
addSbtPlugin("io.github.cquiroz" % "sbt-locales" % "4.5.0")
77
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
88
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")
99
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0")
10-

0 commit comments

Comments
 (0)