From db50f2632adca9327ab4a04340845554229ce200 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Tue, 17 Dec 2024 16:36:14 +0000 Subject: [PATCH 1/3] Update coursier to 2.1.22 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2ce69ba2..f23fed66 100644 --- a/build.sbt +++ b/build.sbt @@ -194,7 +194,7 @@ lazy val lsp = module("lsp") "io.circe" %% "circe-core" % "0.14.10", "org.http4s" %% "http4s-ember-client" % "0.23.30", "org.http4s" %% "http4s-ember-server" % "0.23.30" % Test, - ("io.get-coursier" % "coursier" % "2.1.14") + ("io.get-coursier" % "coursier" % "2.1.22") .cross(CrossVersion.for3Use2_13) .exclude("org.scala-lang.modules", "scala-collection-compat_2.13") .exclude("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"), From 8557278254b3105056d4023b0fdfee94389b18bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Sun, 22 Dec 2024 20:46:28 +0100 Subject: [PATCH 2/3] Apply workaround for jsoniter --- build.sbt | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/build.sbt b/build.sbt index f23fed66..1f1dd1b0 100644 --- a/build.sbt +++ b/build.sbt @@ -17,10 +17,20 @@ inThisBuild( val ScalaLTS = "3.3.4" val ScalaNext = "3.5.2" +val jsoniterVersion = "2.32.0" + ThisBuild / scalaVersion := ScalaNext ThisBuild / versionScheme := Some("early-semver") import scala.sys.process.* +import scala.util.chaining.* + +def jsoniterFix(deps: Seq[ModuleID]) = + deps.map( + _.exclude("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_3") + ) ++ Seq( + "com.github.plokhotnyuk.jsoniter-scala" % "jsoniter-scala-core_2.13" % jsoniterVersion + ) def crossPlugin( x: sbt.librarymanagement.ModuleID @@ -88,7 +98,7 @@ def module( lazy val pluginCore = module("plugin-core").settings( libraryDependencies ++= Seq( "com.disneystreaming.smithy4s" %% "smithy4s-http4s" % smithy4sVersion.value - ), + ).pipe(jsoniterFix), // mimaPreviousArtifacts := Set(organization.value %% name.value % "0.7.0"), mimaPreviousArtifacts := Set.empty, scalaVersion := ScalaLTS, @@ -163,14 +173,14 @@ lazy val core = module("core") .settings( libraryDependencies ++= Seq( "org.typelevel" %% "cats-effect" % "3.5.7", - "com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % "2.32.0", + "com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % jsoniterVersion, "com.disneystreaming.smithy4s" %% "smithy4s-dynamic" % smithy4sVersion.value, "com.disneystreaming.smithy4s" %% "smithy4s-http4s" % smithy4sVersion.value, "com.disneystreaming.smithy4s" %% "smithy4s-aws-http4s" % smithy4sVersion.value, "com.disneystreaming.smithy4s" % "smithy4s-protocol" % smithy4sVersion.value % Test, "com.disneystreaming.alloy" % "alloy-core" % "0.3.14" % Test, "software.amazon.smithy" % "smithy-aws-traits" % "1.53.0" % Test, - ) + ).pipe(jsoniterFix) ) .dependsOn( protocol4s, @@ -194,12 +204,10 @@ lazy val lsp = module("lsp") "io.circe" %% "circe-core" % "0.14.10", "org.http4s" %% "http4s-ember-client" % "0.23.30", "org.http4s" %% "http4s-ember-server" % "0.23.30" % Test, - ("io.get-coursier" % "coursier" % "2.1.22") - .cross(CrossVersion.for3Use2_13) - .exclude("org.scala-lang.modules", "scala-collection-compat_2.13") - .exclude("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_2.13"), + ("io.get-coursier" % "coursier_2.13" % "2.1.22") + .exclude("org.scala-lang.modules", "scala-collection-compat_2.13"), "org.typelevel" %% "cats-tagless-core" % "0.16.2", - ), + ).pipe(jsoniterFix), buildInfoPackage := "playground.lsp.buildinfo", buildInfoKeys ++= Seq(version, scalaBinaryVersion), (Test / test) := { From c8f820181cd9a4578ab278269355597b04304b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Sun, 22 Dec 2024 20:46:51 +0100 Subject: [PATCH 3/3] add comment --- build.sbt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sbt b/build.sbt index 1f1dd1b0..ba2bdc2e 100644 --- a/build.sbt +++ b/build.sbt @@ -25,6 +25,8 @@ ThisBuild / versionScheme := Some("early-semver") import scala.sys.process.* import scala.util.chaining.* +// Workaround for https://github.com/coursier/coursier/issues/2001 +// from https://github.com/coursier/coursier/issues/2001#issuecomment-2556556628 def jsoniterFix(deps: Seq[ModuleID]) = deps.map( _.exclude("com.github.plokhotnyuk.jsoniter-scala", "jsoniter-scala-core_3")