softwaremill/magnolia
61.1
Adequate · 28 September 2026
1.6k
lines of production code
Scala
primary language
2
measurements over time
What this system is
Magnolia is a Scala 3 library that provides automatic typeclass derivation for case classes and sealed traits using the \scala.deriving.Mirror\ mechanism. It enables developers to generate implementations for common operations such as serialization, equality, and default value handling without manual boilerplate. The system supports complex type structures including recursive types, type aliases, and inheritance, while ensuring derived instances are serializable and performant.
Features
Initial release of Magnolia 1.x for Scala 3
This change introduces Magnolia 1.x, a new major version of the library specifically built for Scala 3. It establishes the \magnolia1\ package and the \com.softwaremill.magnolia1\_3\ Maven coordinate, ensuring binary compatibility with the legacy Magnolia 0.17 (Scala 2) version. The release includes the core typeclass derivation logic, updated documentation, and configuration files (such as \.scalafmt.conf\ and \.scala-steward.conf\) to support the new Scala 3 codebase.
(repo-wide) · high confidence
New Magnolia 1 example implementations for typeclass derivation
Added a suite of example implementations in the \magnolia1.examples\ package demonstrating the Magnolia 1 API, including \SubtypeInfo\ for inspecting subtype metadata, \Decoder\ and \DecoderSafe\ for string-to-type conversion, \HasDefault\ for handling default values, \Eq\ and \WeakHash\ for equality and hashing, \Patcher\ for field updates, \Print\ and \Show\ for serialization, and \TypeNameInfo\ for type introspection.
examples/src/main/scala/magnolia1 · high confidence
Removals
Removal of experimental generic macro implementation
The experimental generic macro implementation located in \core/src/main/scala/generic.scala\ has been removed. This file contained a proof-of-concept macro for deriving generic type extractors using mutual recursion and global state, which is no longer part of the codebase.
core/src/main/scala · high confidence
Removal of legacy Extractor macro example
The legacy \Extractor\ macro implementation and its associated example code in \example.scala\ have been removed from the codebase. This change eliminates the manual macro-based derivation logic for string-to-type extraction, reflecting the project's shift toward the new typeclass-based implementation.
examples/src/main/scala · high confidence
Behavioural changes
Introduction of Magnolia 1.0 API with by-value construction and reduced allocations
This change introduces the \magnolia1\ package, a new version of the library's API designed for better performance and backward compatibility. The core \CaseClass\ abstraction now includes a \rawConstruct(fieldValues: Array\[Any\])\ method to reduce allocations and CPU usage during construction, alongside a shift toward a by-value API. The \Param\ interface has been updated to support \inheritedAnnotations\ and \evaluateDefault\ for more robust default value handling, while maintaining backward compatibility with v1.0.0 signatures. Example implementations for CSV serialization, exported typeclasses, and passthrough derivations demonstrate the new \derives\ syntax and extension methods.
repository · high confidence
Magnolia 1 implementation for Scala 3 with improved performance and serialization support
The core derivation logic in \core/src/main/scala/magnolia1\ has been rewritten for Scala 3, introducing \impl.scala\ and \macro.scala\ to leverage \scala.deriving.Mirror\. This change adds support for type aliases and preserves their annotations, fixes derivation failures for large sum types by unrolling recursive inline loops, and improves default value evaluation efficiency. Additionally, the implementation ensures typeclass serializability by wrapping lambda-generated functions in \SerializableFunction0/1\ traits and provides a \rawConstruct\ API to reduce allocations during construction.
core/src/main/scala/magnolia1 · high confidence
Test coverage
Added JVM serialization tests for Magnolia 1 type classes; Expanded test coverage for Magnolia 1 derivation capabilities; Removed obsolete magnolia test scaffolding.
Dependencies
Upgrade to Scala 3.3.6 and migrate build infrastructure
The project has been upgraded to Scala 3.3.6, replacing the previous Scala 2 support. The build system has been migrated from the legacy sbt-crossproject structure to the modern sbt-projectmatrix, simplifying the configuration for JVM, JS, and Native platforms. Additionally, the organization identifier has changed from com.propensive to com.softwaremill.magnolia1\_3, and the build now utilizes SoftwareMill's common build settings and OSS publishing configuration.
(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 60 → 61 (+1.4)
- Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.
Lenses
- Code Health 96 → 96 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 54 → 54 (+0.0)
- Readiness 52 → 56 (+3.5)
- Security 62 → 62 (+0.0)
Resolved (3)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
softwaremill/magnolia 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 e2459dc89026f8df23ad4ff25f16ff13af6abed8 — 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.