From 1c1dc33802cf1923e37711141d97b6ebe2589bb2 Mon Sep 17 00:00:00 2001 From: Carlos Quiroz <3615303+cquiroz@users.noreply.github.com> Date: Tue, 7 May 2024 17:32:56 -0400 Subject: [PATCH] Library updates --- .envrc | 3 + .gitignore | 1 + build.sbt | 4 +- flake.lock | 156 ++++++++++++++++++ flake.nix | 28 ++++ project/build.properties | 2 +- .../sbt-locales/common-filtering/build.sbt | 7 +- .../common-filtering/project/plugins.sbt | 4 +- .../sbt-locales/common-filtering/test | 2 +- .../sbt-locales/no-filtering/build.sbt | 4 +- .../no-filtering/project/plugins.sbt | 4 +- 11 files changed, 200 insertions(+), 15 deletions(-) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..4cb3cbf9 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +use flake +layout node +eval "$shellHook" diff --git a/.gitignore b/.gitignore index 53b22708..3d792e07 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ project/metals.sbt .bloop /project/project/ /project/target/ +.direnv/ diff --git a/build.sbt b/build.sbt index 99f4531d..0803cdb2 100644 --- a/build.sbt +++ b/build.sbt @@ -43,10 +43,10 @@ lazy val api = crossProject(JSPlatform, JVMPlatform, NativePlatform) name := "cldr-api", scalaVersion := scalaVersion212, description := "scala-java-locales cldrl api", - crossScalaVersions := Seq(scalaVersion212, "2.13.13", "3.3.3"), + crossScalaVersions := Seq(scalaVersion212, "2.13.14", "3.4.1"), libraryDependencies ++= List( ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2").cross(CrossVersion.for3Use2_13), - "org.scalameta" %%% "munit" % "1.0.0-M7" % Test + "org.scalameta" %%% "munit" % "1.0.0-RC1" % Test ), testFrameworks += new TestFramework("munit.Framework") ) diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..80c450b7 --- /dev/null +++ b/flake.lock @@ -0,0 +1,156 @@ +{ + "nodes": { + "devshell": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1708939976, + "narHash": "sha256-O5+nFozxz2Vubpdl1YZtPrilcIXPcRAjqNdNE8oCRoA=", + "owner": "numtide", + "repo": "devshell", + "rev": "5ddecd67edbd568ebe0a55905273e56cc82aabe3", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1709126324, + "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "d465f4819400de7c8d874d50b982301f28a84605", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1704161960, + "narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "63143ac2c9186be6d9da6035fa22620018c85932", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1710097495, + "narHash": "sha256-B7Ea7q7hU7SE8wOPJ9oXEBjvB89yl2csaLjf5v/7jr8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d40e866b1f98698d454dad8f592fe7616ff705a4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": [ + "typelevel-nix", + "flake-utils" + ], + "nixpkgs": [ + "typelevel-nix", + "nixpkgs" + ], + "typelevel-nix": "typelevel-nix" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "typelevel-nix": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1710188850, + "narHash": "sha256-KbNmyxEvcnq5h/wfeL1ZxO9RwoNRjJ0IgYlUZpdSlLo=", + "owner": "typelevel", + "repo": "typelevel-nix", + "rev": "60c3868688cb8f5f7ebc781f6e122c061ae35d4d", + "type": "github" + }, + "original": { + "owner": "typelevel", + "repo": "typelevel-nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..331c0e5c --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + inputs = { + typelevel-nix.url = "github:typelevel/typelevel-nix"; + nixpkgs.follows = "typelevel-nix/nixpkgs"; + flake-utils.follows = "typelevel-nix/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, typelevel-nix }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs-x86_64 = import nixpkgs { system = "x86_64-darwin"; }; + scala-cli-overlay = final: prev: { scala-cli = pkgs-x86_64.scala-cli; }; + pkgs = import nixpkgs { + inherit system; + overlays = [ typelevel-nix.overlay scala-cli-overlay ]; + }; + in { + devShell = pkgs.devshell.mkShell { + imports = [ typelevel-nix.typelevelShell ]; + typelevelShell = { + nodejs.enable = true; + jdk.package = pkgs.jdk8; + }; + }; + } + + ); +} diff --git a/project/build.properties b/project/build.properties index 04267b14..081fdbbc 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.9 +sbt.version=1.10.0 diff --git a/sbt-locales/src/sbt-test/sbt-locales/common-filtering/build.sbt b/sbt-locales/src/sbt-test/sbt-locales/common-filtering/build.sbt index b61090b3..c9fbbbd3 100644 --- a/sbt-locales/src/sbt-test/sbt-locales/common-filtering/build.sbt +++ b/sbt-locales/src/sbt-test/sbt-locales/common-filtering/build.sbt @@ -8,14 +8,11 @@ lazy val root = .settings( name := "no-filtering", cldrVersion := CLDRVersion.Version("38.1"), - scalaVersion := "3.0.0-M3", + scalaVersion := "3.4.1", localesFilter := LocalesFilter.Selection("en-US", "fi", "fi-FI"), nsFilter := NumberingSystemFilter.Minimal, currencyFilter := CurrencyFilter.Selection("EUR"), supportISOCodes := true, supportNumberFormats := true, - libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.1").withDottyCompat(scalaVersion.value) - ) - .nativeSettings( - scalaVersion := "2.13.4" + libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.2").cross(CrossVersion.for3Use2_13) ) diff --git a/sbt-locales/src/sbt-test/sbt-locales/common-filtering/project/plugins.sbt b/sbt-locales/src/sbt-test/sbt-locales/common-filtering/project/plugins.sbt index 4a7e1908..08931a9a 100644 --- a/sbt-locales/src/sbt-test/sbt-locales/common-filtering/project/plugins.sbt +++ b/sbt-locales/src/sbt-test/sbt-locales/common-filtering/project/plugins.sbt @@ -4,8 +4,8 @@ addSbtPlugin( ) addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5") diff --git a/sbt-locales/src/sbt-test/sbt-locales/common-filtering/test b/sbt-locales/src/sbt-test/sbt-locales/common-filtering/test index 2959787b..3286546f 100644 --- a/sbt-locales/src/sbt-test/sbt-locales/common-filtering/test +++ b/sbt-locales/src/sbt-test/sbt-locales/common-filtering/test @@ -1,3 +1,3 @@ > managedSources -$ exec cat jvm/target/scala-3.0.0-M3/src_managed/main/locales/cldr/data/data.scala +$ exec cat jvm/target/scala-3.4.1/src_managed/main/locales/cldr/data/data.scala > compile diff --git a/sbt-locales/src/sbt-test/sbt-locales/no-filtering/build.sbt b/sbt-locales/src/sbt-test/sbt-locales/no-filtering/build.sbt index 0ff67571..0314c922 100644 --- a/sbt-locales/src/sbt-test/sbt-locales/no-filtering/build.sbt +++ b/sbt-locales/src/sbt-test/sbt-locales/no-filtering/build.sbt @@ -7,10 +7,10 @@ lazy val root = .in(file(".")) .settings( name := "no-filtering", - scalaVersion := "2.13.4", + scalaVersion := "2.13.14", cldrVersion := CLDRVersion.Version("35.0"), localesFilter := LocalesFilter.All, nsFilter := NumberingSystemFilter.All, calendarFilter := CalendarFilter.All, - libraryDependencies += "org.portable-scala" %%% "portable-scala-reflect" % "1.1.1" + libraryDependencies += "org.portable-scala" %%% "portable-scala-reflect" % "1.1.2" ) diff --git a/sbt-locales/src/sbt-test/sbt-locales/no-filtering/project/plugins.sbt b/sbt-locales/src/sbt-test/sbt-locales/no-filtering/project/plugins.sbt index 0615af06..4fda7689 100644 --- a/sbt-locales/src/sbt-test/sbt-locales/no-filtering/project/plugins.sbt +++ b/sbt-locales/src/sbt-test/sbt-locales/no-filtering/project/plugins.sbt @@ -4,6 +4,6 @@ addSbtPlugin( ) addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.1.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")