You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moves the build from sbt 1.12.13 to sbt 2.0.2. sbt 2.x compiles the build
definition with Scala 3 (not 2.12), runs on JDK 17+, in-sources projectMatrix,
caches settings/tasks, and hardens several policies - each needed adjustments.
Plugins (project/plugins.sbt):
- All plugins now resolve their sbt-2 (`_sbt2_3`) builds; addSbtPlugin syntax is
unchanged.
- sbt-projectmatrix: dropped - projectMatrix/VirtualAxis/MatrixAction are in sbt 2
core (the standalone plugin has no sbt-2 build and is archived).
- sbt-ide-settings: org.jetbrains % 1.1.0 -> org.jetbrains.scala % 1.1.4 (only the
new coordinate publishes for sbt 2).
- sbt-protoc: 1.0.8 -> 1.1.0-RC2 (only sbt-2 build; no stable release yet) and the
scalapb compilerplugin 0.11.20 -> 1.0.0-alpha.6. Required: sbt-protoc RC2 pulls
protoc-bridge_3, which on the scalapb side only lines up with the 1.0.0-alpha
line; stable scalapb (0.11.20) still resolves protoc-gen_2.13/protoc-bridge_2.13
and fails sbt's cross-version-suffix check. This bumps the chimney-protobufs
runtime (scalapbRuntime derives from compilerplugin) onto scalapb 1.0.0-alpha.6.
build.sbt DSL:
- `versions`/`dev` moved from build.sbt-local `val ... = new { ... }` into objects
in project/BuildVersions.scala. Scala 3 widens an anonymous object to `Object`
and hides its members, and sbt does not lift build.sbt-local objects into the
settings scope; as project/*.scala objects they stay referenceable unqualified.
- `%%%` -> `%%` (sbt 2.x `%%` is platform-aware for projectMatrix JS/Native cells;
`%%%` no longer exists).
- Task caching: `scalacOptions --=` on a both-empty `fold` inferred Seq[Nothing]
(no JsonFormat); typed the empties as Seq.empty[String].
- `x cross y` infix -> `x.cross(y)` (Scala 3 infix rule).
- CI command builders (ciCommand / publishLocalForTests), console tasks and logo
updated for sbt 2.x's flipped projectMatrix cell-id suffixes: Scala 3 is now
unsuffixed and Scala 2.13 is "2_13" (was: 2.13 unsuffixed, Scala 3 "3").
- allowMismatchScala := true on chimneySandwichTests: sbt 2.x rejects a cross-Scala
projectDependency by default, but that 2.13x3 dependency is the point of the
sandwich tests.
- evictionErrorLevel := Level.Warn: sbt 2.x promotes eviction conflicts to hard
errors; on Scala Native, cats-laws (Test) -> scalacheck pulls scala-native
test-interface 0.5.8 vs chimney's 0.5.12 (a benign 0.5.x upgrade). Restore warn.
.jvmopts: -Xmx2g -> -Xmx6g. Scala 3 Scala-Native codegen (in-process LLVM IR for
the whole macro-generated codebase) OOMs at 2g under sbt 2.x; 4g already clears it
with no GC pressure, 6g leaves headroom (fine on 16GB CI runners).
Workflows (.github/workflows/ci.yml):
- Scala 2.13 build jobs moved from temurin:11 to temurin:17 - sbt 2.x requires
JDK 17+ to run, so the old 2.13-on-JDK-11 job is no longer possible. Emitted
bytecode stays JDK 11/17 compatible via the -release flags. (release.yml and the
snippets job already run on 17; benchmark.yml on 21.)
Validated on sbt 2.0.2 (JDK 24): the full test matrix is green - Scala 2.13 and
Scala 3, each on JVM / Scala.js / Scala Native (Native Scala 3 needs the 6g heap).
Hearth resolves to 0.4.1; hearth_sjs1/hearth_native0.5 resolve via the platform-
aware %%. Not re-verified: MiMa (dormant pre-2.0.0) and the coverage/doc tasks.
| - Scala JVM adds no suffix to a project name seen in build.sbt
339
295
| - Scala.js adds the "JS" suffix to a project name seen in build.sbt
340
296
| - Scala Native adds the "Native" suffix to a project name seen in build.sbt
341
-
| - Scala 2.13 adds no suffix to a project name seen in build.sbt
342
-
| - Scala 3 adds the suffix "3" to a project name seen in build.sbt
297
+
| - Scala 3 adds no suffix to a project name seen in build.sbt
298
+
| - Scala 2.13 adds the suffix "2_13" to a project name seen in build.sbt (sbt 2.x flipped the sbt 1.x scheme)
343
299
|
344
-
|When working with IntelliJ or Scala Metals, edit "val ideScala = ..." and "val idePlatform = ..." within "val versions" in build.sbt to control which Scala version you're currently working with.
300
+
|When working with IntelliJ or Scala Metals, edit "ide.scala"/"ide.platform" in dev.properties (read by `dev` in project/BuildVersions.scala) to control which Scala version you're currently working with.
345
301
|
346
302
|If you need to test library locally in a different project, use publish-local-for-tests or manually publishLocal:
347
303
| - chimney
@@ -356,8 +312,8 @@ lazy val root = project
356
312
"Compile and test all projects in all Scala versions and platforms (beware! it uses a lot of memory and might OOM!)"
357
313
)
358
314
.noAlias,
359
-
sbtwelcome.UsefulTask("chimney3/console", "Drop into REPL with Chimney DSL imported (3)").noAlias,
360
-
sbtwelcome.UsefulTask("chimney/console", "Drop into REPL with Chimney DSL imported (2.13)").noAlias,
315
+
sbtwelcome.UsefulTask("chimney/console", "Drop into REPL with Chimney DSL imported (3)").noAlias,
316
+
sbtwelcome.UsefulTask("chimney2_13/console", "Drop into REPL with Chimney DSL imported (2.13)").noAlias,
361
317
sbtwelcome
362
318
.UsefulTask(releaseCommand(git.gitCurrentTags.value), "Publish everything to release or snapshot repository")
363
319
.alias("ci-release"),
@@ -400,9 +356,9 @@ lazy val chimney = projectMatrix
0 commit comments