v2.0.0-RC1
Pre-releaseImportant
Since Chimney got affected by 3.7.0 change in givens resolution we had to analyze the possible ways of fixing the issue.
While there is a temporary workaround the proper fix requires releasing a new major version of the library, which ideally would commit to a new Scala 3 LTS. In the meantime, a milestone 2.0.0 release series is planned. All bug fixes and issues would be still implemented on stable version, and then ported to 2.0.0 milestones, until a proper release could be made.
To make maintanance of 2 lines easier, the macro backend - originally extracted into
chimney-macro-commons- has now been migrated to Hearth, a standalone, cross-platform macro-utilities library that supersedeschimney-macro-commonsand lives on its own release cycle. Since it is used only in macros and nothing else relies on it, it should be safe to just bump Chimney's minor version when updating the metaprogramming layer.This release is the first release candidate of the 2.0.0 series.
Note
Scala 2.12 is dropped in the 2.x line. The 2.x artifacts are published for Scala 2.13 and Scala 3 only. If you need Scala 2.12 support, please stay on the latest 1.x release.
The Scala 3 artifacts of the 2.x line target Scala 3.9.0 (LTS) and JDK 17+ (the Scala 2.13 artifacts still target JDK 11+), following Hearth's own JDK 11+ baseline. Make sure your runtime matches. Since 3.9.0 is the new LTS, the minimum required Scala 3 version will stay at 3.9.x from now on.
Note
This release will become 2.0.0 if no issues are found that would require a breaking change to fix. The master branch tracks the development of Chimney 2.0.0.
As announced earlier, I have stepped down from actively maintaining Chimney. The Hearth migration and the 2.0.0 release are the last large effort I intend to make on this project — going forward, I intend to keep Chimney compatible with new Scala versions, but I do not plan to actively develop new features or fixes myself. No fixes from 2.0.0 will be backported to the 1.x line by me, though I am happy to share knowledge, mentor new contributors, review and merge PRs for both 1.x backports and new 2.x features/improvements from anyone willing to contribute. It's a healthy project, where most demanded things already landed and only some edge cases might need a correction.
Changelog (since 2.0.0-M4):
- replaced the
Vector[Any]-backedRuntimeDataStorewith a cons-cell linked list (#602) - DSL chain construction (.withFieldConst,.withFieldComputed, etc.) replaces the per-step Vector overhead with a single-cons-cell prepend; additionally, the macros try to flatten DSL chains at compile time into a single pre-initialized array allocation (O(1) allocations when the whole chain is visible to the macro); the store materializes to anArraylazily on first indexed access, keeping lookup O(1) - scoped Scala 3 path extension methods with context functions (#770) - path extensions (
matching,everyItem,everyMapKey,everyMapValue,matchingSome,matchingLeft,matchingRight) are no longer available on every value oncedsl.*orsyntax.*is imported; they now require aChimneySelectorgiven, which is only provided inside DSL selector lambdas — not a breaking change since selector functions are inline macro parameters - bumped Scala 3 to 3.9.0 (LTS), Hearth to 0.4.2, Kindlings to 0.3.2
- migrated the build to sbt 2.x
- bugfixes:
- #935 -
withEnumCaseHandledoverride was silently dropped when the target type wasOption[T]
- #935 -
Contains all features/bugfixes added since 2.0.0-M4 (1.11.0).