Skip to content
CAI
Software that uses CAICheck a score

scalalandio/chimney

58.6

Adequate · 28 September 2026

31.9k

lines of production code

Scala

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Chimney is a Scala library that provides compile-time macro derivation for transforming data structures, including total and partial transformers, bidirectional codecs, and patchers. It supports cross-compilation across Scala 2.13 and 3, as well as JVM, Scala.js, and Scala Native, with specific integrations for Cats, Protobufs, and Java collections. The system allows users to configure derivation rules via a DSL, handling complex scenarios like sealed hierarchies, nested collections, and error accumulation in partial transformations.

How it got here

2017–2023 — Chimney 2.x Hearth migration and Scala 3 support

43 changes.

This period centered on the major Chimney 2.x release, migrating the macro backend from chimney-macro-commons to the Hearth engine to enable unified Scala 2.13 and Scala 3 support. The work involved a comprehensive rewrite of the derivation logic, DSL, and error reporting systems, alongside a build infrastructure upgrade to sbt 2.0.8. Extensive test coverage was added to validate the new rule-based architecture, automatic derivation features, and cross-platform compatibility.

2024–2026 — Hearth migration and macro expansion

17 changes.

The project migrated its macro backend to the Hearth 0.4.0 engine, introducing a flexible SPI for custom derivation handlers and optimizing compile-time performance. This period also expanded the library's capabilities with new syntax for partial results, built-in support for Scala 3 IArrays, and compile-time derivation macros for Iso and Codec types.

Features

Add automatic derivation for Iso, Codec, Patcher, and Transformer

Chimney now provides automatic derivation for Iso, Codec, Patcher, and PartialTransformer/Transformer type classes via new \derive\ methods on their respective companion objects. These methods use macros to automatically generate instances with default settings, allowing users to derive transformations without manually defining them. If derivation fails, it results in a compilation error.

chimney/src/main/scala-2/io/scalaland/chimney · high confidence

Added built-in support for IArrays in Scala 3

Chimney now provides built-in support for Scala 3's immutable arrays (IArray) in the Scala 3 build. This change introduces a compatibility trait that registers an implicit \IsCollection\ instance for \IArray\[A\]\ on Scala 3, enabling seamless transformation of IArrays, while the Scala 2 build remains unaffected as IArrays do not exist in that version.

chimney/src/main/scala-2/io/scalaland/chimney/internal/runtime, chimney/src/main/scala-3/io/scalaland/chimney/internal/runtime · high confidence

Added compile-time derivation macros for Iso and Codec

New macro implementations (IsoMacros and CodecMacros) have been added to enable automatic and semi-automatic derivation of Iso (isomorphism) and Codec (bidirectional transformation) types. These macros allow users to define bidirectional conversions between domain and DTO types with configurable overrides and implicit scope support, extending the library's transformation capabilities beyond standard transformers.

chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation/iso · high confidence

Initial JMH benchmark harness for Chimney performance measurement

Added a new JMH-based benchmark suite in the benchmarks module to measure the performance of various Chimney components. The suite includes benchmarks for basic transformations (simple, large, and huge datasets), container transformations (Array, Vector, Map), coproduct handling, DSL overhead (field renaming, computed fields, constants, and split chains), standard library types (value classes, Option, Either), and partial transformer error accumulation (happy and unhappy paths). A common benchmark configuration class sets up JMH parameters such as warmup, measurement iterations, and JVM arguments to ensure consistent performance testing.

benchmarks · high confidence

New DSL flags and configuration types for transformer and patcher derivation

The DSL package now exposes new type-level configuration classes and DSL traits to control derivation behavior. TransformerConfiguration and PatcherConfiguration allow sharing derivation flags via implicit scope. New DSL traits (TransformerFlagsDsl, TransformerSourceFlagsDsl, TransformerTargetFlagsDsl, PatcherFlagsDsl, PatcherPatchedValueFlagsDsl) provide methods to enable or disable specific flags, including custom subtype name comparison (enableCustomSubtypeNameComparison), unmatched subtype policy checks (enableUnmatchedSubtypePolicyCheck), inherited accessor lookup (enableInheritedAccessors), method accessor lookup (enableMethodAccessors), default value fallbacks (enableDefaultValues, enableDefaultValueOfType), Java Beans getter/setter support (enableBeanGetters, enableBeanSetters), ignoring unmatched bean setters (enableIgnoreUnmatchedBeanSetters), non-Unit setter support, macro logging (enableMacrosLogging), and patcher-specific behaviors like ignoring None/Left in patches, appending collections in patches, and ignoring redundant patcher fields. Additionally, new sealed abstract classes define strategies and policies: CollectionFallbackMergeStrategy (SourceAppendFallback, FallbackAppendSource) for merging collections, OptionFallbackMergeStrategy (SourceOrElseFallback, FallbackOrElseSource) for merging Options/Eithers, TransformedNamesComparison (BeanAware, StrictEquality, CaseInsensitiveEquality, CamelSnakeCaseEquality, IgnorePrefix) for custom field/subtype name matching, UnmatchedSubtypePolicy (FailOnUnmatchedTargetSubtype), and UnusedFieldPolicy (FailOnIgnoredSourceVal). ImplicitTransformerPreference (PreferTotalTransformer, PreferPartialTransformer) controls implicit transformer priority.

chimney/src/main/scala/io/scalaland/chimney/dsl · high confidence

New Scala 3 DSL definition classes for Transformer, Patcher, Codec, and Iso

The \chimney/src/main/scala-3/io/scalaland/chimney/dsl\ package now includes a complete set of new definition classes (\TransformerDefinition\, \PartialTransformerDefinition\, \PatcherDefinition\, \CodecDefinition\, \IsoDefinition\) and their corresponding 'Into' and 'ForAll' variants. These classes provide the Scala 3-specific DSL entry points for configuring derivation, allowing users to customize field renaming, constant/computed values, and sealed subtype handling via inline macros. This change introduces the structural foundation for the Scala 3 path extensions, separating the DSL syntax from the underlying macro implementation and supporting scoped overrides for recursive derivations.

chimney/src/main/scala-3/io/scalaland/chimney/dsl · high confidence

New compile-time derivation macros for Iso and Codec

This change introduces new Scala 3 macro implementations for deriving Iso and Codec instances. The new IsoMacros.scala file provides \deriveIsoWithDefaults\ and \deriveIsoWithConfig\ methods that generate bidirectional transformations using \deriveTotalTransformer\ for both directions, while the new CodecMacros.scala file provides \deriveCodecWithDefaults\ and \deriveCodecWithConfig\ methods that generate codecs by combining \deriveTotalTransformer\ for encoding and \derivePartialTransformer\ for decoding. Both macros handle implicit scope configuration and suppress unused warnings, replacing previous derivation logic with a more explicit macro-based approach.

chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/derivation/iso · high confidence

New derivation policy and debug logging APIs

Chimney introduces opt-in structural derivation and debug logging capabilities. Users can now restrict where automatic derivation is allowed by importing \io.scalaland.chimney.policy.allowDerivationForChimney\ in specific scopes when the \opt-in\ policy is enabled via compiler settings. Additionally, derivation debugging is accessible by importing \io.scalaland.chimney.debug.\_\ to log macro expansions, or globally via the \-Xmacro-settings:chimney.logDerivation=true\ compiler option.

chimney/src/main/scala/io/scalaland/chimney · high confidence

New integration typeclasses for custom collections, optionals, and outer transformers

Chimney introduces a set of new typeclasses in the \integrations\ package to support more flexible and robust custom type conversions. \TotallyBuildIterable\ and \TotallyBuildMap\ allow seamless conversion to standard collections like \Seq\ and \Map\, while \PartiallyBuildIterable\ and \PartiallyBuildMap\ enable handling of validated or non-empty collection types that may fail during construction. The new \OptionalValue\ trait aligns custom optional types with Chimney's \Option\ handling, and \DefaultValue\ provides a mechanism to supply default values for missing fields. Additionally, \TotalOuterTransformer\ and \PartialOuterTransformer\ allow users to define conversions for wrapper types where inner value derivation is delegated to Chimney, and \ChimneyMacroExtension\ offers a macro-extension SPI for registering pair-specific transformations that require access to the derivation engine.

chimney/src/main/scala/io/scalaland/chimney/integrations · high confidence

New syntax extensions for converting Options and F\[A\] to partial Results

Users can now easily convert Scala Options and generic wrapper types (F\[A\]) into partial Results using new extension methods. The \Option\ extension provides \orErrorAsResult\, \orStringAsResult\, and \orThrowableAsResult\ to handle None cases by supplying specific error types, while the generic \F\[A\]\ extension offers \asResult\ to lift any type with an \AsResult\ instance into a Result, simplifying error handling in partial transformations.

chimney/src/main/scala-3/io/scalaland/chimney/partial · high confidence

New syntax utilities for converting Options and wrapper types to partial Results

Users can now easily convert Scala Options and other wrapper types into partial Results using new extension methods. The \PartialResultOptionOps\ class adds \orErrorAsResult\, \orStringAsResult\, and \orThrowableAsResult\ to \Option\[A\]\, allowing users to specify how \None\ values should be handled by providing an error, string message, or throwable. Additionally, \PartialResultAsResultOps\ provides an \asResult\ method for any type \F\[A\]\ that has an \AsResult\ instance, enabling seamless conversion of wrapped values into partial Results.

chimney/src/main/scala-2/io/scalaland/chimney/partial · high confidence

Architecture

New macro backend powered by Hearth 0.4.0

The Chimney derivation engine has migrated its macro implementation from the legacy \chimney-macro-commons\ to the Hearth 0.4.0 framework. This architectural shift introduces a new internal structure within \io.scalaland.chimney.internal.compiletime\, featuring a derivation cake (\ChimneyDefinitions\) that integrates Hearth's \MacroCommons\ and \StdExtensions\. The change brings a unified, cross-platform approach to expression handling (\ChimneyExprs\) and type-level operations (\ChimneyTypes\), replacing previous Scala 2/3 specific shims with Hearth's native \Expr\ and \Type\ APIs. It also standardizes error reporting through new \DerivationError\, \TransformerDerivationError\, and \PatcherDerivationError\ types, ensuring consistent and detailed compile-time feedback for users.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime · high confidence

Behavioural changes

Chimney 2.x: New macro engine, documentation, and developer experience

This release introduces Chimney 2.x, migrating the macro backend from chimney-macro-commons to the Hearth engine (0.4.0+), which powers the new derivation logic and enables features like macro-logging and flame-graph profiling. The library now officially supports Scala 2.13 and Scala 3 (3.9.0+) across JVM, Scala.js, and Scala Native, while dropping support for Scala 2.11 and Scala.js 0.6.x. Documentation has been rewritten using MkDocs and hosted on Read the Docs, and the developer experience is improved with a new \try-chimney.sh\ script for quick experimentation, standardized formatting via scalafmt 3.11.5, and clearer contribution guidelines.

(repo-wide) · high confidence

Chimney Cats integration refactored with new macro backend and expanded typeclass support

The Chimney Cats integration has been restructured to migrate the macro backend to Hearth 0.4.0, enabling automatic structural transformations for Cats types like \Traverse\, \FunctionK\, \NonEmptyMap\, and \NonEmptySet\ without requiring explicit imports. The integration now provides comprehensive Cats typeclass instances (including \Monad\, \ArrowChoice\, \Parallel\, and \InvariantSemigroupal\) for \Transformer\, \PartialTransformer\, \partial.Result\, \Codec\, and \Iso\. Additionally, it introduces extension methods and \AsResult\ conversions to bridge \partial.Result\ with Cats \Validated\ types (\Validated\, \ValidatedNec\, \ValidatedNel\), while removing the previous collection-specific implicits in favor of the new Hearth-based derivation.

chimney-cats/src/main · high confidence

Chimney macro backend migrated to Hearth 0.4.0

The internal macro derivation engine has been refactored to use the Hearth 0.4.0 library, replacing the previous macro-commons implementation. This migration introduces a new rule-based architecture with a unified derivation pipeline, allowing for more flexible and composable transformation rules. Users benefit from improved error reporting, better handling of nested paths, and a more robust foundation for future features like scoped overrides and fallbacks, all while maintaining compatibility with existing DSL configurations.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/derivation/transformer · high confidence

Chimney macro backend migrated to Hearth 0.4.0 with rule-based derivation architecture

The internal macro implementation has been refactored to use the Hearth 0.4.0 framework, replacing the previous macro-commons dependency. This migration introduces a new rule-based derivation architecture where transformation logic is organized into distinct modules (e.g., ProductToProduct, EitherToEither, IterableToIterable, MapToMap, OptionToOption). Users benefit from improved error reporting, better handling of fallbacks for collections and options, and more consistent behavior across Scala 2.13 and Scala 3. The change also includes fixes for specific issues like ambiguous renames, AnyVal transformations, and recursive derivation paths.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/derivation/transformer/rules · high confidence

Collection and optional-type derivation now delegates to Hearth extension providers

The macro backend for deriving transformations of \Option\-like types and collections (including \Iterable\, \Map\, and smart constructors like \NonEmptyList\) has been rewritten to use Hearth's \IsOption\, \IsCollection\, and \IsMap\ providers. This change replaces previous hardcoded shape-matching logic with a provider-based system that supports both standard Scala/JVM collections and third-party types registered via ServiceLoader. The implementation introduces caching for these integration types to improve compilation performance and establishes a strict precedence order: user-defined implicits take priority, followed by Chimney's built-in integrations, with Hearth's extension providers serving as a fallback. This allows users to derive transformations for custom collection types without writing explicit Chimney integrations, provided they register compatible Hearth providers.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/derivation/transformer/integrations · high confidence

Expanded compile-time patching rules for Option, Either, and Collection types

The patcher derivation logic in the chimney library has been refactored to support more granular patching scenarios, specifically handling cases where an Option, Either, or Collection is patched with an Option-wrapped version of itself (e.g., patching \Collection\[A\]\ with \Option\[Collection\[Patch\]\]\). New rule modules now explicitly manage these nested optional structures, allowing patches to be applied when the value is present and ignored when absent, while also improving error reporting for missing fields in product types and supporting subtype upcasting during patching.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/derivation/patcher/rules · high confidence

Internal runtime refactoring for DSL overrides and error handling

The internal runtime package has been restructured to support the new nested-paths DSL and improved error reporting. This includes replacing the previous Vector-based data storage with a more efficient RuntimeDataStore, introducing type-level Path and ArgumentList structures for precise field targeting, and adding evidence types (IsCollection, IsEither, IsFunction, IsMap, IsOption) to enable scoped DSL extension methods like .everyItem and .matchingLeft. Additionally, new PatcherFlags, TransformerFlags, PatcherOverrides, and TransformerOverrides types provide the foundation for granular configuration and override handling, while NonEmptyErrorsChain improves the representation of path-annotated transformation errors.

chimney/src/main/scala/io/scalaland/chimney/internal/runtime · high confidence

Introduces Scala 3-specific derivation macros for core type classes

This change adds new platform-specific companion objects for Scala 3 that provide inline \derive\ methods for \Codec\, \Iso\, \PartialTransformer\, \Patcher\, and \Transformer\. These new files delegate to specific macro implementations (\CodecMacros\, \IsoMacros\, etc.) to enable automatic derivation with default settings, replacing or augmenting previous derivation mechanisms for these types in the Scala 3 build.

chimney/src/main/scala-3/io/scalaland/chimney · high confidence

Migrate macro backend to Hearth 0.4.0

The macro implementation has been migrated from the legacy chimney-macro-commons to the Hearth 0.4.0 backend. This update introduces a new engine-aware Service Provider Interface (SPI) via \ChimneyMacroExtension\, allowing external modules to register custom derivation handlers (such as special-cased pair derivations and recursive inner derivation deferral) that are loaded via \ServiceLoader\. It also integrates Hearth's \StandardMacroExtension\ SPI, enabling test-only providers for custom types like \TestWrapper\, \TestCollection\, and \TestDict\ to be consulted as the engine's fallback layer. Additionally, Scala 2-specific platform bridges have been added to handle existential type re-quantification and Java enum decoding within the new macro infrastructure.

chimney-chimney-extension-test, chimney-engine-test-extension, chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime, chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime · high confidence

New Scala 2 macro implementation for Transformer derivation

The Scala 2 macro backend for the Transformer DSL has been replaced with a new implementation in \TransformerMacros.scala\. This change introduces a new rule-based architecture that handles total and partial transformations, supporting configuration overrides and implicit scope flags. Users benefit from improved error handling and consistency in how transformer definitions are derived at compile time, although some legacy macro fallback behaviors may differ slightly.

chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation/transformer · medium confidence

New Scala 3 TransformerMacros implementation

The Scala 3 macro backend for transformer derivation has been replaced with a new implementation in \TransformerMacros.scala\. This change introduces a new macro class that handles the derivation of both total and partial transformers, supporting configuration overrides and implicit scope flags. The new implementation integrates with \RuntimeDataStoreFlattening\ to handle runtime data and uses \Expr.summon\ to locate transformer configurations, replacing the previous macro logic.

chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/derivation/transformer · high confidence

New internal datatype views for product, sealed, and value-class analysis

The macro backend now uses new internal datatype views in \chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/datatypes\ to analyze source and target types. \ProductTypes\ provides a unified view of products (case classes, Java beans, POJOs) by combining primary constructor arguments with Java Bean setters for construction, and classifying getters (constructor vals, body vals, accessors, bean getters) for extraction. \SealedHierarchies\ flattens sealed hierarchies and Java enums to their leaf subtypes, filtering out non-conforming GADT subtypes while preserving same-named entries from different scopes to detect ambiguity. \SingletonTypes\ identifies singleton values (case objects, enum values, literal types, Unit, Null) using Hearth's \SingletonValue\ and literal codecs. \ValueClasses\ handles \AnyVal\, Java boxed primitives, and structural single-field wrappers, distinguishing between total wrappers and partial (smart-constructor) wrappers. \StdExtensionsLoading\ ensures Hearth's standard extensions (collections, maps, options, etc.) are loaded exactly once per macro expansion. These changes refactor the internal type analysis layer to rely on Hearth 0.4.0+ APIs, improving how Chimney understands and transforms complex type structures.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/datatypes · high confidence

New syntax package for Chimney DSL extension methods

The \chimney/syntax\ package has been introduced to provide extension methods for Transformer, PartialTransformer, and Patcher operations, as well as specific DSL path-matching helpers like \matching\, \matchingSome\, and \matchingLeft\. This change reorganizes the library's public API by moving these extension methods into a dedicated \syntax\ package, allowing users to import only the necessary operations for transformation and patching without pulling in the full DSL context, while the methods themselves remain macro-erased stubs intended for use within Chimney's DSL expressions.

chimney/src/main/scala-2/io/scalaland/chimney/syntax · high confidence

Opt-in structural derivation policy and configurable macro behavior

Chimney now supports an opt-in policy for structural derivation (case class and sealed hierarchy transformations) via the \chimney.policy.enabled\ macro setting, allowing users to restrict automatic derivation to specific scopes or require an explicit \import io.scalaland.chimney.policy.allowDerivationForChimney\. Additionally, the library introduces Kindlings-style debug APIs (\chimney.logDerivation\, \chimney.timeout\) for external logging and timeout configuration, and allows customization of \@SuppressWarnings\ and \@nowarn\ annotations on generated code via macro settings. These changes are gated by a migration to the Hearth 0.4.0 macro backend, which also alters the internal execution model for derivation runs.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/derivation · high confidence

Optimized compile-time DSL chain flattening for faster derivation

The internal compile-time derivation logic for both Scala 2 and Scala 3 has been updated to flatten partial DSL chains more efficiently. By analyzing the prefix tree to identify empty bases or opaque bases, the system now accumulates runtime data terms and applies optimizations like \prependedAll\ directly, reducing the complexity of the generated code and improving derivation performance.

chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation, chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/derivation · high confidence

Patcher derivation now supports explicit configuration overrides and flags

The internal macro implementation for Patcher derivation has been refactored to accept explicit \PatcherOverrides\ and \PatcherFlags\ types, moving away from implicit scope flags for configuration. This change allows the Patcher DSL to support more granular control over derivation behavior through a new \PatcherConfiguration\ mechanism, enabling users to override specific derivation rules or flags explicitly rather than relying solely on implicit resolution.

chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/derivation/patcher · medium confidence

Patcher derivation now uses a unified transformation-based backend

The internal implementation of the Patcher macro has been refactored to derive patches by reusing the existing Transformer derivation logic. Instead of maintaining a separate patching code path, the new \Derivation\ trait in this location orchestrates the process by converting patch-specific configurations (such as \ignoreNoneInPatch\ or \appendCollectionInPatch\) into corresponding transformer flags and overrides. This change aligns the Patcher's behavior with the Transformer's resolution of implicit instances and allows patch-specific customizations to be applied via the same \PatcherConfiguration\ and \PatcherFlags\ structures that drive the underlying transformation rules.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/derivation/patcher · high confidence

Protobuf conversions now work without explicit imports

The \chimney-protobufs\ module now registers Hearth and Chimney macro extensions via ServiceLoader, enabling automatic derivation of conversions for Protobuf well-known types (such as \ByteString\, wrapper types, \Timestamp\, \Duration\, and \Empty\) without requiring users to import \io.scalaland.chimney.protobufs.\*\. This shift from implicit-based derivation to engine-level extensions simplifies usage, while specific partial transformers for empty oneofs and unrecognized enums remain available as implicits.

chimney-protobufs/src/main · high confidence

Refactored Scala 2 DSL macro implementation

The internal Scala 2 DSL macros have been restructured to support a new override and flag system. This change introduces dedicated macro implementations for Transformer, PartialTransformer, Iso, Codec, and Patcher definitions, enabling new DSL methods such as withFieldConst, withFieldComputed, withFieldRenamed, withSealedSubtypeRenamed, withFallback, and scoped source/target flags. The refactoring separates macro logic into specific bundles (DslBundle) and delegates to shared DSL logic classes, improving maintainability and preparing the codebase for additional configuration features.

chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/dsl · high confidence

Refactored Scala 2 Patcher macro implementation to use PatcherConfiguration

The Scala 2 Patcher macro backend has been rewritten to derive patchers using a new \PatcherConfiguration\ and \PatcherOverrides\ structure instead of the previous implicit scope flags approach. This change aligns the Patcher's derivation behavior with the Transformer's new configuration model, allowing for more explicit control over patcher derivation and better support for future feature additions within the DSL.

chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation/patcher · high confidence

Refactored partial transformation error reporting and result handling

The internal structure for partial transformation results and errors has been reorganized to improve clarity and path tracking. A new \AsResult\ type class now standardizes the conversion of types like \Option\, \Either\, and \Try\ into the library's \Result\ type. Error reporting is enhanced with dedicated \Error\, \ErrorMessage\, \Path\, and \PathElement\ data structures, allowing for more precise, path-annotated error messages that distinguish between computed and constant values. The \Result\ type itself has been refined with additional utility methods such as \orElse\ for fallback handling and improved conversion methods like \asEitherErrorPathMessages\, providing users with more detailed and structured feedback when partial transformations fail.

chimney/src/main/scala/io/scalaland/chimney/partial · high confidence

Reworked DSL definition classes and scoped overrides for Scala 2

The DSL definition classes in the \chimney.dsl\ package have been restructured to support a new rule-based macro architecture. This change introduces dedicated definition classes for \Codec\, \Iso\, \Patcher\, \Transformer\, and their partial variants, all of which now expose methods like \withFieldConst\, \withFieldComputed\, and \withFieldRenamed\ via macros. Additionally, new \ForAll\ variants (\TransformerDefinitionForAll\, \PartialTransformerDefinitionForAll\, etc.) are added to allow scoped overrides that apply to all matching \\[FromMatch, ToMatch\]\ derivations recursively, enabling more granular control over transformation rules in nested structures.

chimney/src/main/scala-2/io/scalaland/chimney/dsl · high confidence

Scala 3 DSL extension methods now use compile-time errors for invalid usage

The Scala 3 syntax package has been refactored to scope DSL extension methods (such as \matching\, \matchingSome\, \matchingLeft\, and \matchingRight\) using context functions and \compiletime.error\. These methods now explicitly fail at compile time if invoked outside of the Chimney DSL context (e.g., within \.withField\*\ methods), ensuring that users receive immediate feedback when attempting to use these path-selection helpers incorrectly, rather than potentially encountering confusing runtime or macro errors.

chimney/src/main/scala-3/io/scalaland/chimney/syntax · high confidence

Scala 3 DSL macros now support scoped field and subtype overrides

The Scala 3 DSL implementation has been refactored to use a new macro backend that supports scoped configuration overrides. This change introduces specific macro implementations for Transformer, PartialTransformer, Patcher, Codec, and Iso definitions, enabling users to apply targeted transformations such as renaming fields (\withFieldRenamed\), computing field values (\withFieldComputed\), handling sealed subtypes (\withSealedSubtypeRenamed\/\withSealedSubtypeHandled\), and setting fallbacks (\withFallback\). These macros allow for more precise control over data mapping and patching logic within the Scala 3 path, replacing the previous generic macro structure with specialized handlers for each definition type.

chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/dsl · high confidence

Snippet testing now reads configuration from mkdocs.yml and interpolates templates

The \scripts/test-snippets.scala\ script has been updated to parse the MkDocs configuration file (\mkdocs.yml\) to extract extra variables, enabling dynamic template interpolation in code snippets (e.g., replacing \{{ chimney\_version() }}\ with the actual library version). It also automatically injects a default Scala 2.13.18 version into snippets that do not explicitly specify a Scala version, ensuring consistent execution across the documentation test suite.

scripts · high confidence

Unified DSL macro backend for Scala 2 and 3

The internal DSL macro implementation has been refactored to use a shared codebase for both Scala 2 and Scala 3. This change introduces new \DslDefinitions\ and \DslMacros\ files that normalize platform-specific syntax differences (such as implicit classes versus extension methods) using the Hearth macro library. As a result, selector lambdas and constructor lambdas are parsed consistently across versions, ensuring that DSL features like path markers (\matching\, \everyItem\) and named-tuple field access behave identically on both Scala 2 and Scala 3.

chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/dsl · high confidence

Test coverage

Added JavaEnum test fixture; Added Scala 2-specific regression tests and compatibility utilities; Added Scala 2.13 and Scala 3 test fixtures for chimney-sandwich; Added Scala 3 enum and opaque type test fixtures; Added Scala 3-specific test coverage for Chimney transformations; Added comprehensive test coverage for Cats integration; Added comprehensive test coverage for Java collection and primitive conversions; Added comprehensive test suite for Chimney's derivation engine and DSL; Added cross-compilation tests for Scala 2 and Scala 3 macro transformations; Added test coverage for protobuf built-in types and extension providers; Added test fixtures for Chimney transformations; Added test fixtures for Java Bean mapping scenarios; Added test fixtures for Java enum edge cases; Added test fixtures for ProductToProduct merging scenarios; Added test fixtures for lens-like functionality; Added test utilities for Chimney Cats module; Added test utility helpers for Option and Either conversions; Added tests for Hearth-backed Java type support and Java enum transformations; Added tests for compile-time derivation policy logic; Added tests for internal runtime components.

Dependencies

Migrate build infrastructure to sbt 2.0.8

The project has upgraded its build tool from sbt 1.x to sbt 2.0.8, requiring updates to core plugins such as sbt-scalajs (1.22.0), sbt-scala-native (0.5.12), and sbt-scoverage (2.4.4). This migration introduces a new \project/BuildVersions.scala\ file to centralize version definitions for Scala 2.13 and Scala 3, and forces an upgrade of the ScalaPB ecosystem to version 1.0.0-alpha.6 to resolve cross-version compatibility issues with the new sbt 2 build environment. Additionally, \sbt-projectmatrix\ functionality is now provided directly by sbt 2 core, removing the need for the standalone plugin.

project · high confidence

Migrate build to sbt 2.x and update documentation dependencies

The project has migrated its build system from sbt 1.x to sbt 2.x, which involves moving version definitions from \build.sbt\ to \project/BuildVersions.scala\ to accommodate sbt 2's Scala 3 compilation of the build script. This change also updates the documentation tooling, specifically bumping \mkdocs-material\ to 9.7.7 and \mkdocs-macros-plugin\ to 1.3.7 in \docs/requirements.txt\.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 59 (-3.7)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 90 → 90 (+0.0)
  • Architecture 99 → 83 (-16.1)
  • Maturity 54 → 47 (-7.3)
  • Readiness 59 → 59 (+0.0)
  • Security 69 → 74 (+5.2)

Resolved (4)

  • Hotspot: chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation/RuntimeDataStoreFlattening.scala (chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation/RuntimeDataStoreFlattening.scala)
  • Hotspot: chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/derivation/RuntimeDataStoreFlattening.scala (chimney/src/main/scala-3/io/scalaland/chimney/internal/compiletime/derivation/RuntimeDataStoreFlattening.scala)
  • Hotspot: chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/dsl/DslDefinitions.scala (chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/dsl/DslDefinitions.scala)
  • Off-boarding risk: anonymized user #1

New (4)

  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
  • Documentation: no architecture or design documentation (docs/docs/index.md)
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • .github/workflows — 1 commit
  • project/plugins.sbt — 1 commit

Notable commits

  • change: Bump coursier/setup-action from 3.0.2 to 3.0.3
  • change: Update sbt-git to 2.2.0

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scalalandio/chimney was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 0ead379483a4076684a909d3044d6ad6d9d7ac09 — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-2d9048c36d26.