From 1089fdbf74c89f9d5e963f8cfed87e55740b8436 Mon Sep 17 00:00:00 2001 From: "slick-scala-steward[bot]" <243981+slick-scala-steward[bot]@users.noreply.github.com> Date: Sun, 18 Oct 2026 08:31:28 +0000 Subject: [PATCH 1/2] Update sbt to 2.0.11 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index e0a1aa0..84de650 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.13.0 +sbt.version=2.0.11 From 44524a9de8c5073f5dfa442ae8090b41144ac845 Mon Sep 17 00:00:00 2001 From: Naftoli Gugenheim <98384+nafg@users.noreply.github.com> Date: Wed, 21 Oct 2026 07:56:52 -0400 Subject: [PATCH 2/2] Adapt the slick codegen task to sbt 2 - Classpath.files needs a given FileConverter. - sbt 2 caches tasks and can't cache File outputs; the codegen task writes Tables.scala as a side effect, so mark its key @transient. - Call foreach non-infix; Scala 3 warns on alphanumeric infix calls. Co-Authored-By: Claude Opus 5.5 --- build.sbt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 91031ad..1676450 100644 --- a/build.sbt +++ b/build.sbt @@ -35,6 +35,7 @@ libraryDependencies ++= Seq( (Compile / sourceGenerators) += slick.taskValue // Automatic code generation on build +@transient lazy val slick = taskKey[Seq[File]]("Generate Tables.scala") slick := { val dir = (Compile / sourceManaged).value @@ -47,6 +48,7 @@ slick := { val cp = (Compile / dependencyClasspath).value val s = streams.value + given FileConverter = fileConverter.value runner.value .run( @@ -55,7 +57,8 @@ slick := { Array(slickDriver, jdbcDriver, url, outputDir.getPath, pkg), s.log ) - .failed foreach (sys error _.getMessage) + .failed + .foreach(e => sys.error(e.getMessage)) val file = outputDir / pkg / "Tables.scala"