From cb46b288fe53df1c3d986de1f8756f343086caeb Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 20 Jun 2024 15:50:49 +0200 Subject: [PATCH 1/2] Compute dynamically shapeless version pulled by kernel in IT --- build.sc | 3 ++- .../main/scala/almond/integration/Tests.scala | 24 +++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/build.sc b/build.sc index 56814a74..f8602198 100644 --- a/build.sc +++ b/build.sc @@ -602,7 +602,8 @@ trait Integration extends SbtModule { s"-Dalmond.test.scala-version=${ScalaVersions.scala3Latest}", s"-Dalmond.test.scala212-version=${ScalaVersions.scala212}", s"-Dalmond.test.scala213-version=${ScalaVersions.scala213}", - s"-Dalmond.test.scala213-pulled-by-3-version=${helper.scala213()}" + s"-Dalmond.test.scala213-pulled-by-3-version=${helper.scala213()}", + s"-Dalmond.test.case-app-version=${Versions.caseApp}" ) } def tmpDirBase = T.persistent { diff --git a/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala b/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala index 08594842..0c53a608 100644 --- a/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala +++ b/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala @@ -659,8 +659,28 @@ object Tests { val sbv = scalaVersion.split('.').take(2).mkString(".") val isScala2 = scalaVersion.startsWith("2.") - val kernelShapelessVersion = "2.3.10" // might need to be updated when bumping case-app - val testShapelessVersion = "2.3.3" // no need to bump that one + val caseAppVersion = sys.props.getOrElse( + "almond.test.case-app-version", + sys.error("almond.test.case-app-version Java property not set") + ) + + val kernelShapelessVersion: String = { + val res = coursierapi.Fetch.create() + .addDependencies( + coursierapi.Dependency.of("com.github.alexarchambault", "case-app_" + sbv, caseAppVersion) + ) + .fetchResult() + res.getDependencies.asScala + .find { dep => + dep.getModule.getOrganization == "com.chuusai" && + dep.getModule.getName == "shapeless_" + sbv + } + .map(_.getVersion) + .getOrElse { + sys.error(s"Cannot get shapeless version pulled by case-app $caseAppVersion") + } + } + val testShapelessVersion = "2.3.3" // no need to bump that one assert(kernelShapelessVersion != testShapelessVersion) From 060ce0a694c472238eb093ca338aeb4c24fda79a Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 16 Jun 2024 13:16:51 +0000 Subject: [PATCH 2/2] Update case-app, case-app-annotations to 2.1.0-M29 --- project/deps.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/deps.sc b/project/deps.sc index 7511f910..b72d19f8 100644 --- a/project/deps.sc +++ b/project/deps.sc @@ -3,7 +3,7 @@ import mill.scalalib._ object Versions { def ammonite = "3.0.0-M2-10-f6e2c001" - def caseApp = "2.1.0-M26" + def caseApp = "2.1.0-M29" def coursier = "2.1.10" def jsoniterScala = "2.13.5" def scalafmt = "3.7.15"