0.2.0 - Diff derivation, full Cats algebra, benchmarks, documentation site, and a new logo
LatestThe biggest Kindlings release so far: a new structural-diff module, a much larger Cats type class roster, a single derived-only API, a documentation site with runnable examples, JMH benchmarks against every original library, a round of runtime optimizations — and a new logo. All built on Hearth 0.3.1.
⚠️ Breaking: derive is removed — use derived
The deprecated derive method is gone from all modules. There is now exactly one derivation entry point everywhere: TypeClass.derived[A] (and the matching extension/companion patterns). If you are migrating from 0.1.x, a find-and-replace of .derive[ → .derived[ is all it takes.
New module: kindlings-diff-derivation
Structural comparison of nested types using the Myers diff algorithm — derive Diff[A] instances that produce rich, hierarchical diff results for case classes, sealed traits, collections, maps, sets, options, and strings:
import hearth.kindlings.diffderivation._
case class Person(name: String, age: Int)
implicit val diffPerson: Diff[Person] = Diff.derived[Person]
println(DiffRenderer.render(diffPerson.diff(Person("Alice", 30), Person("Alice", 31)), RenderConfig.plain))
// Person(
// name = "Alice",
// age = 30 -> 31,
// )New in kindlings-cats-derivation
- New type classes:
Band,Semilattice,BoundedSemilattice,Group,CommutativeGroup, andShowPretty - Kind
(*, *) → *derivation:Bifunctor,Bifoldable,Bitraverse - Higher-kinded derivation for sealed hierarchies:
Functor,Foldable,Traverse, and theBi*type classes now handle sealed traits / enums (including recursive, nested HKTs) @sensitiveDataannotation forShow/ShowPretty/FastShowPretty— renders fields or whole types as[redacted](or[redacted: reason]) to keep secrets out of logs
New in kindlings-avro-derivation
- New annotations:
@avroName,@avroAlias,@avroScalePrecision(also per-field),@avroFqnParamNamesfor unambiguous generic type naming - PascalCase field-name transformation support
- Fixes: generic type-name collisions and nested null defaults (#91, #92),
@avroName/@avroScalePrecisionon sealed traits
Runtime performance
Type class instances are now created through factory methods instead of anonymous classes, and three optimization rounds (compile-time config evaluation via Hearth's semiEval, instance-scope schema/decoder caching, inlined built-in encode/decode and collection loops) landed across the codec modules:
- jsoniter: at parity with jsoniter-scala's own macros
- Avro: 1.5–6.5x faster than avro4s
- PureConfig: 3.7–18x faster than pureconfig-generic
- Circe: 1.2–2.6x faster than circe-generic, and the fastest Circe pipeline when combined with the jsoniter-scala-circe booster
- FastShowPretty: more than 2x faster than in 0.1.2
Benchmarks
A new JMH benchmarks module compares every Kindlings module against the original library derivation (circe-generic, jsoniter-scala, kittens, avro4s, pureconfig-generic, tapir) on both Scala 2.13 and 3. Full results — measured on temurin 17 with raw JMH JSON committed to the repository — are published in the benchmark results section of the docs and in each module's user guide.
Documentation
Kindlings now has a proper documentation site: kindlings.readthedocs.io (MkDocs + Material). Every module has a user guide with runnable Scala CLI snippets and verified expected output (checked in CI), plus a feature-parity page comparing Kindlings against each original library, and the benchmark results above.
New logo
Kindlings has a new logo! 🔥
Other improvements
- Smart constructors (
CtorLikeOf) are handled in every decoder rule - Single-element named tuples are guarded against in all value-type rules
- PureConfig strict mode + discriminator fix; sconfig, XML, and diff bugfixes
- Integration test suites for every derivation × integration (refined, Iron) pair, plus combinatorial wrapper × inner-type and annotation × type-shape test matrices
- Updated to Hearth 0.3.1 and the latest upstream libraries
Summary
0.2.0 turns Kindlings from a set of derivation modules into a full ecosystem: one consistent derived API, documentation with verified examples, honest benchmarks against the originals, and a broader type class catalog — including structural diffing as its newest member.
Be sure to look at the documentation, star the project ⭐ and leave us some feedback!