This document tracks feature parity between Kindlings derivation modules and the original libraries they replace, as well as UX improvements Kindlings provides.
Legend: Parity = feature matches original, Improvement = Kindlings does it better, Gap = feature not yet implemented.
Order of the subtypes of a sealed hierarchy (wherever it is observable: schema symbols and subtypes, the order
subtypes are tried in, generators, Order across subtypes, names listed in errors): on Scala 3 the declaration order
(the order Mirror.SumOf uses, as upstream's Scala 3 derivations); on Scala 2 the subtypes sorted by name (Hearth's
ChildrenOrder.ByName: the simple name in natural order, then the full name), the same in every build - Scala 2 class
files do not record the declaration order, so it is unknown for a sealed type from another module or one an incremental
build did not recompile. Upstream Scala 2 derivations (shapeless, Magnolia) sort by the full name; the two orders agree
except for numbered names (Item2 before Item10 vs after it) and subtypes declared in different scopes. Java enum
constants keep their declaration order.
avro-derivation
Replaces:com.sksamuel.avro4s (v4 for Scala 2, v5 for Scala 3 — separate incompatible versions)
Checked against avro4s by the upstream-oracle-tests module (AvroOracleSpec, scala-3/AvroScala3OracleSpec): each
Scala version is compared with its own avro4s line (4.x on Scala 2.13, 5.x on Scala 3) — the schemas, the binary
encoding of sample values, each side decoding the other's bytes, hand-built and invalid inputs, and schema evolution.
The only differences are the ones documented below ("Design decisions" and "Default value differences"); the
AvroConfig.avro4sDefaults preset switches every default value difference to avro4s' behaviour.
Design decisions
Difference
avro4s
Kindlings
Why
Tuple record names
scala.Tuple2 for every (A, B)
scala.Tuple2__A_B (the type arguments, as for any generic type)
With avro4s two different tuple types in one schema get the same name, so the schema's JSON describes the second one wrongly
@AvroEnumDefault on avro4s 5
Ignored (never implemented in 5.x)
@avroEnumDefault sets the ENUM default (as avro4s 4) on both Scala versions
Superset
@AvroScalePrecision on avro4s 5
Declared but ignored (the implicit ScalePrecision applies)
@avroScalePrecision(precision, scale) is honoured on both Scala versions
Superset
avro4s 5 gaps
No recursive types, value classes, scala.Enumeration, working FieldMapper
All supported (compared with avro4s 4 on Scala 2.13)
Superset
Default value differences
Setting
avro4s
Kindlings default
Opt in to avro4s' behaviour
BigDecimal
BYTES + decimal(precision = 8, scale = 2)
STRING
withDecimalConfig(8, 2) or avro4sDefaults
OffsetDateTime
ISO-8601 STRING with the datetime-with-offset logical type
timestamp-millis LONG (UTC; the offset is dropped)
withOffsetDateTimeAsIsoString or avro4sDefaults
Scala default values become schema defaults, as in avro4s (the default's union branch moved first). The opt-out
withoutScalaDefaultsInSchema keeps only @avroDefault defaults; Avro's schema resolution then rejects old data read
with a newer reader schema that adds fields with Scala defaults (missing required field), while decoding a
GenericRecord directly still falls back to the Scala defaults.
Configuration
Feature
avro4s
Kindlings
Status
Namespace config
@AvroNamespace only
@avroNamespace + AvroConfig.namespace
Improvement
Namespace of a type in the empty package
avro4s 5 (Scala 3): none; avro4s 4 (Scala 2): "empty" for records, "<empty>" (not a valid Avro namespace) for enums
None, on both Scala versions
Difference (Scala 2 only)
Field name transforms (FieldMapper)
Yes (SnakeCase, custom; broken on avro4s 5)
Yes (3 built-in strategies — snake, kebab, Pascal case — plus a custom function via withTransformFieldNames)
Parity
Constructor name transforms
Not built-in
Yes
Improvement
Decimal config (precision/scale)
@AvroScalePrecision or implicit ScalePrecision
AvroConfig.decimalConfig, @avroScalePrecision
Parity (different API)
Timestamp precision
A SchemaFor with the timestamp-micros/-nanos logical type
withInstantPrecision, withLocalDateTimePrecision
Parity (different API)
Type classes
Feature
avro4s
Kindlings
Status
SchemaFor[A]
Yes
Yes (AvroSchemaFor)
Parity
Encoder[A]
Yes
Yes (AvroEncoder)
Parity
Decoder[A]
Yes
Yes (AvroDecoder)
Parity
Annotations
Feature
avro4s
Kindlings
Status
Per-field rename (@AvroName / @fieldName)
Yes
Yes
Parity
Documentation (@AvroDoc / @avroDoc)
Yes
Yes
Parity
Namespace (@AvroNamespace / @avroNamespace)
Yes
Yes
Parity
Custom properties (@AvroProp / @avroProp)
Yes
Yes (stackable)
Parity
Aliases (@AvroAlias / @avroAlias)
Yes
Yes (stackable)
Parity
Fixed size (@AvroFixed / @avroFixed)
Yes
Yes
Parity
Error type (@AvroError / @avroError)
v5 only (no v4 equivalent)
Yes (both Scala 2+3)
Improvement (we add it on Scala 2)
Transient field (@AvroTransient / @transientField)
Yes
Yes
Parity
Default values
From constructor defaults (automatic; no @AvroDefault annotation exists upstream)
From constructor defaults (opt out: withoutScalaDefaultsInSchema), overridable with @avroDefault(json)
Fields nesting several type constructors (e.g. List[Option[A]]) for Functor/Foldable/Traverse
Yes (composed instances)
Yes (composed instances)
Parity
Recursive sealed traits for Functor/Foldable/Traverse without an instance in scope
Yes
Yes
Parity
Fields wrapping the type parameter (tail: List[A], children: List[Tree[A]], Option[Vector[A]], List[Option[A]]) for Apply / Applicative / Pure / Reducible / NonEmptyTraverse / NonEmptyAlternative / Alternative
Yes
Yes (instances combined field by field, like kittens; same shapes rejected: no instance for the wrapping type, no non-empty field for Reducible / NonEmptyTraverse, a field of type A for (NonEmpty)Alternative)
Parity
Apply / Applicative for recursive types (e.g. a rose tree)
Yes, but the derived instance overflows the stack (observed on Scala 3)
Yes
Improvement
A wrapped field whose type constructor is another case class to derive (e.g. middle: Nel[A])
Derived recursively
Needs that class's instance in scope (implicit val … = Reducible.derived[Nel])
Difference (Kindlings' HKT derivations do not derive nested type constructors)
PartialOrder: fields with only a PartialOrder (e.g. Set); different subtypes incomparable (NaN)
Yes
Yes
Parity
Empty for sealed traits: the single subtype forming an Empty (case object or derivable case class)
Yes
Yes (a single subtype with an implicit Empty is preferred)
Parity+
SemigroupK/MonoidK/EmptyK: fields G[A] combined with SemigroupK[G]/MonoidK[G]/EmptyK[G]
Yes
Yes
Parity
Nested container fields (e.g., Vector[A], Option[A] in F[A]) for Functor/Foldable/Traverse
Scala 2 only (Shapeless)
Yes (both Scala 2+3)
Improvement
Nested container fields (e.g., List[A] in F[A]) for ConsK
Scala 2 only (Shapeless)
Yes (both Scala 2+3)
Improvement
Head+tail shift pattern for ConsK (e.g., NEL[A](head: A, tail: List[A]))
Scala 2 only
Yes (both Scala 2+3)
Improvement
Derivation API
Feature
kittens
Kindlings
Status
Semi-automatic (TypeClass.derived)
Yes
Yes
Parity
Automatic (import cats.derived.auto.<tc>._)
Yes
Yes for Show, Eq, Order, PartialOrder, Hash, Semigroup, Monoid, Empty (import hearth.kindlings.catsderivation.auto.<tc>._), plus Functor, Contravariant, Foldable, Traverse on Scala 3; other type classes need .derived
Automatic derivation for the remaining type classes
hearth.kindlings.catsderivation.auto covers Show, Eq, Order, PartialOrder, Hash, Semigroup, Monoid, Empty (and Functor, Contravariant, Foldable, Traverse on Scala 3); the others need .derived
cats.sequence / cats.lift / cats.replicateH
kittens Scala-2/Shapeless utilities (sequencing over HLists/records, lifting functions, heterogeneous replicate); out of scope for type-class derivation
Iterable derivation (MkIterable)
kittens Scala-2-only helper; not ported
ConsK for list-like sealed traits
kittens 2 derives ConsK for sealed trait IList[A] with a Cons(head: A, tail: IList[A]) case; Kindlings derives it for case classes only (Gap: it needs a sum-type rule choosing and building the cons case, unrelated to the field-by-field product machinery)
Upstream oracle
upstream-oracle-tests (CatsDerivationOracleSpec, plus CatsDerivationScala3OracleSpec / CatsDerivationScala2OracleSpec
for what kittens derives on one Scala version only) derives the same fixtures with Kindlings' TypeClass.derived and with
kittens' cats.derived.semiauto and compares: show/showLines strings, eqv/compare/partialCompare on every pair
of values (subtype ordering included), hash consistency with eqv, combine/empty/inverse/remove, map/fold/
traverse/reduce/bimap/bitraverse results, the order effects run in (State logs) and how lazy foldRight /
reduceRightTo are, contramap/imap, map2/ap/pure, combineK/empty, cons. Documented differences:
Zero-field types in Show: Kindlings renders a case class without fields and a case object as Name() on both
Scala versions; kittens 3's Show renders Name (its ShowPretty keeps Name()), kittens 2 renders a case object by
its runtime class (Name$()), and kittens 2's ShowPretty puts the parentheses on two lines.
reduceRightTo laziness: same results, but when the function short-circuits on an earlier field Kindlings never
evaluates the later ones; kittens evaluates the function on the later fields first.
Hash values are not compared (only consistency with eqv); kittens does not specify them.
The ConsK gap is asserted too, and so are shapes both reject (e.g. Reducible without a non-empty field, a wrapping
type without the needed instance, a field of type A in NonEmptyAlternative).
Apply/Applicative for the recursive rose tree are not compared: kittens' derived instances overflow the stack.
cats-tagless-derivation
Replaces:cats-tagless derivation macros — cats.tagless.Derive.*, the @auto*K macro annotations (Scala 2), and the Scala 3 derive/derived givens.
Not ported — out of scope (constant / Unit / ReaderT-forwarding algebra implementations)
Derive.semigroupK / Derive.monoidK
Out of scope — these derive plain cats SemigroupK/MonoidK for F[_], not (* -> *) -> * algebra type classes
Upstream oracle
upstream-oracle-tests (CatsTaglessOracleSpec) derives FunctorK, InvariantK, ContravariantK, SemigroupalK, ApplyK and
Instrument with Kindlings and with cats-tagless' Derive.* (Scala 2 macros / Scala 3 @experimental macros) for trait
algebras with one method shape each (plain, nullary, multiple parameter lists, by-name, polymorphic, default arguments,
varargs, F in parameter position, members without F) and compares the results of every method of the transformed
algebra, when the natural transformation runs, how often by-name arguments are evaluated, and Instrument's algebra and
method names. No differences. Case-class algebras are not compared (cats-tagless' Derive.* is trait-only); for them
Kindlings' SemigroupalK/ApplyK still keep the first algebra's members without F.
diff-derivation
Original type class — no replacement target. Provides structural comparison (Diff[A]) for case classes, sealed traits, collections, maps, options, and strings. Uses the Myers diff algorithm for ordered sequences and hierarchical string comparison (line → word → character).
DiffRenderer formats DiffResult as human-readable text with ANSI colors or plain text, showing insertions, deletions, and changes at each nesting level.
Customization
Feature
Support
Implicit Diff for a field type overrides derivation
Yes
Approximate numeric comparison
Diff.approximate(epsilon)
Ignoring fields
Top-level fields only: ignoreField(name) / modifyField(name).ignore (and modifyField(name).using(diff) to replace a field's comparison)
Replaces:circe-generic-extras (community-maintained; Scala 2 via Shapeless, Scala 3 via Mirrors — cross-published JVM/JS/Native since 0.14.5) + circe's Scala 3 ConfiguredEncoder/ConfiguredDecoder/ConfiguredCodec + circe-generic's semiauto helpers
Checked against circe-generic (deriveCodec), circe-generic-extras (deriveConfiguredCodec, deriveEnumerationCodec,
deriveUnwrappedCodec, deriveExtrasCodec, deriveConfiguredFor[..].patch/.incomplete, @JsonKey) and, on Scala 3,
circe-core's ConfiguredCodec/ConfiguredEnumCodec by the upstream-oracle-tests module (CirceGenericOracleSpec,
CirceExtrasScala2OracleSpec, CirceCoreOracleSpec): for each configuration (defaults, strict decoding,
discriminators, member and constructor name transforms) the encoded JSON (key order included) and the results of
decodeJson and decodeAccumulating are compared, on valid inputs and on inputs with every key removed, set to null,
set to a wrong type, renamed, plus unknown keys and wrapper/discriminator edge cases. On Scala 3 failure messages and
cursor histories are compared too; on Scala 2 only outcomes and decoded values (Kindlings uses Scala 3 core's wording
on both versions, see "Error messages and cursor history"). The differences found are the ones listed below as
"Difference". The fixtures are compiled in another module than the tests (as for users deriving instances for types
of a dependency), which keeps covering a since-fixed Hearth bug (docs/research/hearth-bug-children-order-from-classpath.md):
the strict wrapper failure lists the constructor names in declaration order on Scala 3, like circe.
Configuration
Feature
circe
Kindlings
Status
Field name transforms (snake/kebab/pascal/screaming)
Yes (absent field, or null the field decoder rejects, uses the default; a Decoder[Option[X]] that decodes an absent key to a value keeps that value; Scala 3 reads the constructor default methods, no compiler flag needed)
Yes (same rules)
Parity
Discriminator field
Yes
Yes
Parity
Strict decoding
Yes (discriminator key is an expected field; decodeAccumulating reports the strict failure and the field errors; multi-key wrapper objects rejected)
Yes (unified config flag, both Scala 2+3, full enums)
Improvement
Value classes (AnyVal case classes)
Scala 2 (circe-generic, generic-extras): encoded as products ({"value":5}); Scala 3: not derivable (no Mirror for value classes), instances are written by hand; unwrapping via explicit deriveUnwrapped*
Unwrapped by default (5); withoutValueClassUnwrapping (unwrapValueClasses = false) restores the upstream product format, also for value-class sum children
Scala 3: KindlingsCodecAsObject.derive(...), KindlingsEncoder.derive(...), KindlingsDecoder.derive(...); both versions: Configuration(...) with named arguments
Scala 3: KindlingsCodecAsObject.deriveEnum(...) (a plain Codec), KindlingsEncoder.deriveEnum(...), KindlingsDecoder.deriveEnum(...); a sum with non-singleton cases is a compile-time error
Parity
Compile-time configuration
n/a (Scala 3 core: inline Configuration givens)
Evaluated at compile time when possible (inline expressions, named arguments, and on Scala 3 local vals/givens): enables compile-time checks
ExtrasDecoder (isStrict, decodeStrict with the extraneous fields)
generic-extras
hearth.kindlings.circederivation.ExtrasDecoder, implemented by KindlingsDecoder and KindlingsCodecAsObject (derived case-class decoders are strict with strictDecoding)
KindlingsDecoder.incomplete[F] (each Pi supplies the first remaining field of that type, like shapeless' RemoveAll; the configuration's names and defaults apply)
Parity
Labelled incomplete decoders
circe-generic (Scala 2): shapeless FieldType[Witness.'j.T, Int] => C selects the field j
Labelled["j", Int] => C (a String literal type, both Scala 2+3); labelled and by-type parameters can be mixed
Built-in for Int/Long/Double/Short/Byte/UUID/URI/Symbol; manual KeyEncoder/KeyDecoder for value classes & enums
A KeyEncoder/KeyDecoder in scope first (user-provided or circe's), then built-in primitives, value classes and enums (also nested case-object hierarchies)
Improvement (auto value-class/enum keys)
Scala 3 enums
Object encoding of enums with parameterised cases (derives Codec, ConfiguredCodec); string encoding (ConfiguredEnumCodec) for parameterless cases only
Object encoding of full enums; string encoding (enumAsStrings) for parameterless cases
Parity
Sum types and decoding behaviour
Feature
circe
Kindlings
Status
Nested sealed hierarchies (derived intermediates)
Scala 3 core: flattened, a leaf is written under its own name ({"Child":{..}} / "type":"Child") and decoded from its own name at the top level, also when the intermediate's instance is a ConfiguredCodec of the sum (its output is used as is, its constructors are dispatched on)
Same, also when the intermediate's instance was derived by Kindlings (derives KindlingsCodecAsObject, implicit val codec = KindlingsCodecAsObject.derived[Parent], ...)
A leaf reachable through several intermediates (diamond)
Written once under its own name; with an intermediate instance, the first intermediate (declaration order) containing it
Same
Parity
Nested hierarchy of case objects with string encoding
Flattened (ConfiguredEnumCodec recurses into intermediates and ignores their instances)
Flattened (enumAsStrings), also when an intermediate has a user-provided instance
Parity
Wrapper object with superfluous keys
Scala 3 core: the first key (JSON order) naming a known constructor is used, rejected with strict decoding; Scala 2 (circe-generic, generic-extras): the first constructor in coproduct (alphabetical) order found among the keys, accepted also with strict decoding (strict only inside case classes)
Lists the direct constructor names (constructorNames)
Same
Parity
Errors inside collection elements
Keep the cursor history (.members[1].age)
Same
Parity
Missing Option[A] field (any A, with or without a default, useDefaults = false)
None
None
Parity
Value class over Option as an absent field
Upstream codes value classes as products (absent: missing field); deriveUnwrapped* keeps Option decoding (wrapped None)
Default (unwrapping): wrapped None with a derived decoder (the field's default with useDefaults, like a plain Option field), a missing-field failure with a user-provided decoder; withoutValueClassUnwrapping: missing field
Constructor name (with transformConstructorNames) on both sides
Improvement
User-provided KeyEncoder/KeyDecoder for Int/Long/...
Used
Used on both sides (take precedence over the built-in key codecs), also when the map's value type is derived
Parity
Accumulating decoding
Accumulates in nested derived types, Options, collections and maps
Same (also for top-level derived non-products)
Parity
Error messages and cursor history
Scala 3 core wording (type X has no class/object/case named 'n'., Strict decoding X - unexpected fields: ..., ...); Scala 2 shapeless derivations word them differently (JSON decoding to CNil should never happen, a missing first field for a non-object input, ...)
Scala 3 core wording and history on both versions
Parity (Scala 3) / Difference (Scala 2 wording)
Discriminator position
Appended after the fields
Appended after the fields
Parity
Strict decoding of case objects
Extra keys rejected (in sums, at the top level, as fields)
Same
Parity
Encoder.AsObject from semiauto / derives
Products and sums
KindlingsEncoder.derived returns an Encoder.AsObject instance for products and sums; deriveAsObject on a non-object type is a compile-time error
Parity
enumAsStrings / ConfiguredEnumCodec on non-singleton cases
Compile-time error
Compile-time error when the configuration is evaluable at compile time; otherwise a clear runtime failure
Compile-time error (also with an empty first list)
Parity
Cross-compilation
Feature
circe
Kindlings
Status
Unified Scala 2+3 API
No — different modules, different APIs, feature gaps on Scala 3
Yes
Improvement
Cross-platform (JVM/JS/Native)
Yes (circe core and circe-generic-extras 0.14.5+ both cross-publish)
JVM + JS + Native
Parity
Compile-time performance
Scala 2: Shapeless = slow, stack overflows on deep types; Scala 3: Mirror-based
Hearth macros
Improvement (esp. vs Scala 2 Shapeless)
Error messages
"could not find Lazy implicit value..."
Clear messages from Hearth
Improvement
tapir schemas
tapir-schema-derivation with a circe Configuration describes what the circe codec writes: subtypes wrapped as
{"Name": ..} without a discriminator, nested sealed hierarchies flattened (a hand-written intermediate instance kept as
one subtype), AnyVal case classes as objects with unwrapValueClasses = false.
Not ported
Nothing: every circe-generic, generic-extras and Scala 3 core derivation feature has an equivalent (shapeless-specific
APIs have a cross-compiled counterpart, e.g. Labelled for FieldType).
Checked against upstream by JsoniterOracleSpec and JsoniterScala3OracleSpec (upstream-oracle-tests): the same
fixtures derived with KindlingsJsonValueCodec.derived (with the config known at compile time and only at runtime) and
with JsonCodecMaker.make (with the equivalent CodecMakerConfig / makeXxx entry point) are compared on encoded JSON,
accepted and rejected inputs (decoded values and error messages with offsets) and nullValue, for upstream's defaults
(JsoniterConfig.jsoniterScalaDefaults), Kindlings' defaults (exactly the differences listed below) and every config
option with an upstream counterpart (field/leaf/Java-enum name mappers, discriminators, skipUnexpectedFields,
transient*, require*, checkFieldDuplication, isStringified, mapAsArray, number and insert limits,
useScalaEnumValueId, alwaysEmitDiscriminator, skipNestedOptionValues, inlineOneValueClasses,
circeLikeObjectEncoding, requireDiscriminatorFirst, scalaTransientSupport, transientNull, decodingOnly /
encodingOnly, all makeXxx presets), on case classes, defaults, nested options, collections and maps (non-String
keys), ::, ADTs, Scala 3 enums, Java enums, Enumerations, value classes, tuples (generic, named, recursive),
recursive types, annotations, BigDecimal/BigInt, java.time, UUID and Either.
Configuration
Feature
jsoniter-scala
Kindlings
Status
Field name mapper
Yes (a PartialFunction)
Yes (function or partial function)
Parity
ADT leaf class name mapper
Yes (receives the fully-qualified name, default simpleClassName)
Yes (primitives, boxed, BigInt/BigDecimal, UUID, java.time, value classes/opaque types, case-object enums, JsonKeyCodec); unsupported keys are a compile-time error with a compile-time config
User-provided codecs of ADT leaves with a discriminator
Yes (encode/decode the whole leaf object)
Yes (same)
Parity
nullValue / default semantics (None, empty collections, null and []/{} of a collection field → field default, user-provided field codecs receive the field default)
Yes
Yes (except: with checkFieldDuplication = false, a repeated key's decoder gets the field default, not the value read for the earlier occurrence)
Parity
Cross-compilation
Feature
jsoniter-scala
Kindlings
Status
Unified Scala 2+3 API
Separate macro implementations
Unified API
Improvement
Cross-platform
JVM + JS + Native
JVM + JS + Native
Parity
Design decisions (not gaps; each one is an expected difference of the oracle suites):
- allowRecursiveTypes — upstream gates recursive types behind a flag (default false); Kindlings always allows them, so no flag is needed.
- Without a discriminator, a case object is also read from {"Leaf":{}} (a superset; errors for objects given where
upstream expects a string of an ADT of case objects only are Kindlings' then).
- A Scala 3 T | Null field holding null is written as null without transientNull (upstream throws a
NullPointerException).
- With checkFieldDuplication = false, a repeated key's decoder gets the field's default (upstream: the value read for
the earlier occurrence).
- Error messages for a value of another JSON type in a field with a default value do not say or null
(expected '{'; upstream: expected '{' or null).
- Where upstream's Scala 2 and Scala 3 macros report different errors (ADTs without case objects, or with
circeLikeObjectEncoding, given something else than an object: expected '{' / expected '"' or '{'), Kindlings
reports what upstream reports on the same Scala version.
Default value differences
Config field
Upstream default
Kindlings default
Notes
mapMaxInsertNumber
1024
Int.MaxValue
Kindlings: no map-size limit unless set explicitly
setMaxInsertNumber
1024
Int.MaxValue
Kindlings: no set-size limit unless set explicitly
transientDefault
true
false
Kindlings requires explicit opt-in
transientEmpty
true
false
Kindlings requires explicit opt-in
transientNone
true
false
Kindlings requires explicit opt-in
checkFieldDuplication
true
false
Kindlings is permissive by default
discriminatorFieldName
Some("type")
None
Kindlings uses single-key wrapper encoding by default (case objects as strings)
JsoniterConfig.jsoniterScalaDefaults is a one-shot preset that restores upstream's defaults (1024 insert limits, transientDefault/transientEmpty/transientNone = true, etc.) for users who want byte-for-byte upstream behavior.
optics
Replaces:SoftwareMill quicklens (modify/modifyAll/modifyLens
paths). An independent reimplementation with the same DSL names, for Scala 2.13 and 3 on JVM, Scala.js and Scala Native.
Feature
quicklens
Kindlings
Status
modify(_.a.b) with using/apply/setTo/setToIfDefined/setToIf/usingIf
Yes
Yes
Parity
.each / .eachWhere over Seqs, Option, Map values
Yes (Map.eachWhere only on Scala 3)
Yes, on every container an IsCollection/IsMap/IsOption provider supports (Set, Array, java and cats collections, ...)
Improvement
.at(i) / .index(i) / .atOrElse(i, d) over Seqs
.at throws IndexOutOfBoundsException, .atOrElse appends f(d) when absent
Same
Parity
.at(k) / .index(k) / .atOrElse(k, d) over Maps, .at / .index / .atOrElse(d) over Option
.at throws NoSuchElementException
Same
Parity
.eachLeft / .eachRight
Yes
Yes
Parity
.when[Subtype], common fields of sealed hierarchies
upstream-oracle-tests (OpticsOracleSpec) applies the same paths and terminal operations with Kindlings and with
quicklens to the same values — including missing indices/keys, empty options, Lefts, sealed hierarchies — and
compares the results and the exceptions thrown. The one expected difference:
.index(i) with a negative index is a no-op, as in quicklens for Scala 3; quicklens for Scala 2 throws
IndexOutOfBoundsException there (it only checks i < size), so on Scala 2.13 this differs.
pureconfig-derivation
Replaces: PureConfig's auto/semi-automatic derivation surfaces:
- pureconfig.generic.semiauto.{deriveReader, deriveWriter, deriveConvert} (Scala 2 + Scala 3, Shapeless / Magnolia based)
- import pureconfig.generic.auto._ (Scala 2 only — fully recursive Shapeless auto-derivation)
- native derives ConfigReader (Scala 3 only — works without any import since 0.17.7; the older pureconfig.generic.derivation.default._ import is now @deprecated)
The kindlings type classes are subtypes of the upstream ones:
A derived instance is therefore a drop-in replacement for the upstream interface — it can be passed to pureconfig.ConfigSource.string("…").load[A] and any other PureConfig user code with no adaptation. All of PureConfig's built-in primitive / collection / java.time / URI / Path / UUID instances are reused via implicit search; the kindlings macro does not re-implement them and they live behind the same import path users already know.
pureconfig.generic.auto._ (Scala 2 only — Shapeless)
KindlingsConfigReader.derived[A] (sanely-automatic, both Scala 2 + 3)
Improvement
Scala 3 native derives clause
derives ConfigReader via pureconfig.generic.derivation.default (Scala 3 only)
derives KindlingsConfigReader (Scala 3; on Scala 2.13, which has no derives, KindlingsConfigReader.derived[A] is an implicit def)
Parity
Unified Scala 2 + 3 API
No — three separate derivation modules with overlapping APIs and feature gaps
Yes — single API, same call shape on both
Improvement
Scala 3 native derives for Writer/Convert
Native derives / derivation.default supports only ConfigReader; ConfigWriter/ConfigConvert require the separate Magnolia pureconfig-generic-scala3 module (semiauto.deriveConvert)
derives KindlingsConfigWriter / KindlingsConfigConvert on Scala 3 (.derived[A] on Scala 2.13)
Improvement
Recursive types
Works on Scala 2 (Shapeless Lazy); Scala 3 native derivation has limitations
Works without Lazy or wrappers on both
Improvement
ProductHint/CoproductHint respected on Scala 3
Native derives ignores all hints in scope
KindlingsProductHint/KindlingsCoproductHint honored on both Scala 2 + 3
Improvement
Configuration
PureConfig configures derivation via implicit ProductHint[A] and CoproductHint[A] values placed in the type's companion object, plus the upstream ConfigFieldMapping / CamelCase / KebabCase / etc. naming conventions. Kindlings ships both layers: a global PureConfig config class threaded as an implicit (matching the convention used by kindlings-circe-derivation and kindlings-yaml-derivation) and type-indexed KindlingsProductHint[A] / KindlingsCoproductHint[A] for per-type overrides. Defaults match upstream PureConfig exactly: fields are ConfigFieldMapping(CamelCase, KebabCase), subtypes are ConfigFieldMapping(PascalCase, KebabCase), the discriminator is Some("type"), useDefaults is true, and allowUnknownKeys is true.
Feature
PureConfig
Kindlings
Status
Field name transforms (camelCase ↔ snake_case ↔ kebab-case ↔ …)
ConfigFieldMapping + ProductHint per type
Same pureconfig.ConfigFieldMapping reused; placed on PureConfig.transformMemberNames for the global default and on KindlingsProductHint[A].transformMemberNames for per-type overrides
Parity
Constructor (subtype) name transforms
FieldCoproductHint.transformConstructorNames per ADT
Same ConfigFieldMapping reused; placed on PureConfig.transformConstructorNames globally and on KindlingsCoproductHint.Field[A] / KindlingsCoproductHint.Wrapped[A] per ADT
Parity
Discriminator field
FieldCoproductHint(fieldName) (default "type")
PureConfig.discriminator = Some("type") global default; KindlingsCoproductHint.Field[A](fieldName = …) per ADT override
Parity
Single-key sealed-trait wrapping
Custom CoproductHint (or EnumCoproductHint)
PureConfig.discriminator = None (.withWrappedSubtypes) globally; KindlingsCoproductHint.Wrapped[A]() per ADT
Parity
Use case-class default values for missing fields
ProductHint(useDefaultArgs = true) (default)
PureConfig.useDefaults = true (default, matches upstream); KindlingsProductHint[A](useDefaults = …) per type
Parity
Strict mode (reject unknown keys)
ProductHint(allowUnknownKeys = false) per type
PureConfig.allowUnknownKeys = false global (.withStrictDecoding); KindlingsProductHint[A](allowUnknownKeys = false) per type — one UnknownKey failure per unknown key, after the field failures, as upstream
Parity
Per-type customization (different config per type)
Yes (per-companion ProductHint / CoproductHint)
Yes (implicit val hint: KindlingsProductHint[MyType] / KindlingsCoproductHint.Field[MySealed] resolved by the macro at derivation site, overriding the global PureConfig)
Parity
First-success sealed families (no disambiguation)
FirstSuccessCoproductHint — subtypes attempted in the alphabetical order of their names, first success wins, NoValidCoproductOptionFound otherwise; written without disambiguation
KindlingsCoproductHint.FirstSuccess[A]() — same order, failure and output
Parity
Annotations
PureConfig itself does not use annotation decorators — all customization is done through implicit hints in companion objects. Kindlings adds annotations on top so users can keep field-rename and transient logic next to the field declaration:
Feature
PureConfig
Kindlings
Status
Per-field rename
None (configured via ProductHint field-name mapping)
@configKey("user_name") (both Scala 2 + 3)
Improvement
Per-subtype rename
Via FieldCoproductHint.fieldValue override
@configKey("variant-name") (both Scala 2 + 3)
Improvement
Transient field
None (no built-in annotation)
@transientField (requires default value, both Scala 2 + 3)
Improvement
Type support
Type-class instances for primitives, collections, java.time, java.net, java.nio.file.Path, UUID, and friends are inherited from PureConfig itself — extending pureconfig.ConfigReader means implicit search picks up everything PureConfig already ships. Kindlings adds the same type-shape support its sister modules provide via the macro:
Feature
PureConfig
Kindlings
Status
Primitives, String, BigDecimal, BigInt
Yes (via BasicReaders)
Reused from upstream
Parity
Option[A] (missing key → None)
Yes (via optionReader)
Reused from upstream
Parity
List/Vector/Seq/Set/Array
Yes (via CollectionReaders)
Reused from upstream
Parity
Map[String, A]
Yes
Reused from upstream
Parity
URL, URI, Path, File, UUID, Pattern, Regex
Yes
Reused from upstream
Parity
Java time (Instant, Duration, Period, ZoneOffset, ZoneId, Year, …)
Yes
Reused from upstream
Parity
FiniteDuration, ConfigMemorySize
Yes
Reused from upstream
Parity
Case classes → HOCON object
Via Shapeless / Magnolia
Via Hearth macro (cleaner generated code, faster compile)
Parity
Sealed traits → discriminator object
Via FieldCoproductHint
Via macro + discriminator config
Parity
Sealed traits → single-key wrapping
Via custom CoproductHint
Via macro + withWrappedSubtypes
Parity
Case-object enums (North/South/…) → HOCON string
deriveEnumerationReader[E] (separate API)
Same KindlingsConfigReader.derived[E] / KindlingsConfigWriter.derived[E] with withWrappedSubtypes (no discriminator): case-object families read and write strings, as deriveEnumerationReader/Writer; with the default discriminator they are { type = north } objects, as upstream's default FieldCoproductHint
Improvement
Singleton (case object) members
Yes
Yes
Parity
Value classes / AnyVal wrappers
Manual ConfigReader.fromString per type
Automatic unwrapping via IsValueType (covers AnyVal, extends AnyVal, refined types via refined-integration, opaque types)
Improvement
Refined types (eu.timepit.refined)
Separate pureconfig-refined module
Automatic via kindlings-refined-integration (Either[String, A] wrap detected by IsValueType)
Improvement
Iron (Scala 3 opaque types with constraints)
Separate pureconfig-iron module
Automatic via kindlings-iron-integration
Improvement
neotype (Scala 3 Newtype/Subtype)
Manual ConfigReader/ConfigWriter per type
Automatic via kindlings-neotype-integration (validated with the companion's make)
Improvement
scala-newtype (@newtype/@newsubtype)
Manual (e.g. deriving from the underlying instance) per type
Automatic via kindlings-newtype-integration (JVM)
Improvement
Scala 3 named tuples
Not supported
Yes
Improvement
Scala 3 union types (A \| B)
Limited
Yes
Improvement
Recursive types
Works (Shapeless on Scala 2; Scala 3 native has limitations)
Works without Lazy or wrappers on both
Improvement
Cross-compilation
Feature
PureConfig
Kindlings
Status
Unified Scala 2 + 3 API
No — pureconfig-generic (Scala 2, Shapeless) and pureconfig-generic-scala3 (Scala 3, Magnolia / native derives) are separate modules with overlapping but non-identical features
Yes — single kindlings-pureconfig-derivation module compiled for both
Improvement
Cross-platform
JVM only (transitive com.typesafe:config dependency is JVM-only)
JVM only (same reason)
Parity
Interop with regular PureConfig user code
Because the kindlings type classes extend the upstream ones, derived instances are usable wherever a pureconfig.ConfigReader[A] (or Writer[A] / Convert[A]) is expected. This is verified by KindlingsConfigConvertSpec test "interop: kindlings reader works with pureconfig.ConfigSource":
implicitvalreader:KindlingsConfigReader[SimplePerson]=KindlingsConfigReader.derived[SimplePerson]valloaded=pureconfig.ConfigSource.string("name = Alice, age = 30").load[SimplePerson]// resolves `reader` via implicit searchloaded==>Right(SimplePerson("Alice",30))
summonExprIgnoring filter
To prevent infinite macro expansion, the kindlings macro filters out its own derived companion methods during implicit search (KindlingsConfigReader.type and KindlingsConfigConvert.type on the reader side; KindlingsConfigWriter.type and KindlingsConfigConvert.type on the writer side). Users who also enable upstream auto-derivation — pureconfig.generic.auto._ (Scala 2) or a derives ConfigReader clause on the type itself (Scala 3; the pureconfig.generic.derivation.default._ import is deprecated since 0.17.7) — will get whichever derivation rule is more specific in implicit resolution; if both are in scope and you want the kindlings derivation, do not also import the upstream auto-derivation surfaces.
Checked against upstream (oracle)
upstream-oracle-tests (PureConfigOracleSpec) derives the same fixtures with Kindlings and with pureconfig's own
derivation (pureconfig.generic.semiauto: Shapeless on Scala 2, the hint-aware pureconfig-generic-scala3 on Scala 3,
with the equivalent ProductHint / FieldCoproductHint / FirstSuccessCoproductHint, and deriveEnumerationReader /
deriveEnumerationWriter for case-object enumerations), and compares the values read from HOCON — including every
failure, its reason and path — and the config values written. There are no expected differences:
every failure is reported, not only the first one: every field of a case class (then the unknown keys of a strict
product), every item of a collection and every value of a map;
a missing key is KeyNotFound with upstream's candidate keys (KeyNotFound.forKeys), passed to readers of missing
keys (ReadsMissingKeys, e.g. Option) like upstream;
with a discriminator (upstream's FieldCoproductHint): the value must be an object (also for case objects), the
subtype is read without the discriminator key (so a strict subtype does not report it, and a strict case class read
on its own does), an unknown value is UnexpectedValueForFieldCoproductHint at the discriminator, and writing a
subtype that has a field named like the discriminator throws upstream's CoproductHintException;
without a discriminator, a family of case objects reads only strings (upstream's deriveEnumerationReader; an
unknown value is NoValidCoproductOptionFound on Scala 2 and CannotConvert on Scala 3, as upstream on each);
an empty Option field is omitted when writing (upstream's WritesMissingKeys), not written as null.
The Kindlings-only additions stay opt-in: withWrappedSubtypes for families that are not all case objects (single-key
objects, no upstream counterpart), @configKey, @transientField.
External ecosystem add-ons. Cats data types (NonEmptyList, etc.) are reachable via kindlings-cats-integration.
pureconfig-yaml / pureconfig-circe etc. format adapters
Out of scope — kindlings ships separate kindlings-yaml-derivation and kindlings-circe-derivation modules.
ConfigSource API (ConfigSource.file, ConfigSource.url, …)
Not duplicated — users keep using pureconfig.ConfigSource.* and pass our derived instances to it.
Custom FailureReason subtypes
Inherited from upstream when summoning user-provided ConfigReaders. The kindlings macro itself reports upstream's failure reasons (KeyNotFound, WrongType, UnknownKey, UnexpectedValueForFieldCoproductHint, NoValidCoproductOptionFound, …; the sealed-family ones come from the small pureconfig-generic-base module, now a dependency).
Kindlings reads its own KindlingsProductHint / KindlingsCoproductHint (the configuration of upstream's built-in hints), not arbitrary from/to implementations.
Yes (via Hearth Enum.parse; JVM-only, both Scala 2.13 & 3)
Improvement
Scala Enumeration
Manual only
Yes
Improvement
Recursive types
scalacheck-shapeless: needs an explicit Recursive[T] to bound recursion (else StackOverflowError)
Yes (no wrappers needed: sizes shrink with depth and at size 0 only non-recursive cases are generated)
Improvement
Shrink for collections
ScalaCheck's shrinkContainer
Same algorithm (same candidates, same order)
Parity
Cogen for products, Option, collections
ScalaCheck's instances; case classes: every field, then Cogen[Unit]
Same perturbation (same seeds)
Parity
User-provided implicits
Implicit search
Yes (checked before derivation)
Parity
Upstream oracle
upstream-oracle-tests (ScalaCheckOracleSpec) compares Kindlings with scalacheck-shapeless on Scala 2.13 and with
scalacheck-derived (the Scala 3 equivalent) on Scala 3, each used as
documented (Recursive / RecursionFallback for the recursive type). Generators are random, so it compares properties:
subtype coverage, collection/string sizes within Gen.size, generation at every size including 0, termination of
recursive types; Shrink streams and Cogen seeds are deterministic and compared exactly for fixed values. Where the
two upstreams disagree Kindlings follows scalacheck-derived. Documented differences:
Size 0 (Scala 3): scalacheck-derived returns Gen.fail for some sealed-trait-based types once the size is
exhausted (even with a RecursionFallback); Kindlings still generates a value.
Shrinking sealed traits (Scala 2): scalacheck-shapeless also shrinks a value into the other subtypes (e.g. a
Circle into a case object); Kindlings, like scalacheck-derived, shrinks only within the value's subtype.
Cogen for sealed traits (Scala 2): scalacheck-shapeless advances the seed once per preceding subtype; Kindlings,
like scalacheck-derived, perturbs with the subtype's Cogen and then with its index.
Not supported
Feature
Notes
Configuration class
No configuration knobs (no field name transforms, etc. — generators don't need them)
Annotations (@fieldName, @transientField)
Not applicable — generators don't interact with serialized field names
Original type class — no replacement target. PureConfig's underlying parser, com.typesafe:config, is JVM-only, which locks PureConfig out of Scala.js and Scala Native projects. sconfig-derivation fills that gap by deriving config readers/writers/codecs against org.ekrich:sconfig — a Scala port of typesafe-config that runs on JVM, Scala.js, and Scala Native — while sharing the same HOCON syntax, the same Config / ConfigValue shape, and the same derivation knobs as kindlings-pureconfig-derivation (so users can mentally swap between the two depending on their target platform).
Because no upstream library does derivation against sconfig today, this module is "exceeds upstream" by definition: there is no upstream oracle to compare against. Its behaviour follows upstream PureConfig's, as matched by kindlings-pureconfig-derivation (which is checked against PureConfig by PureConfigOracleSpec). The regression net is UpstreamSemanticsSpec in sconfig-derivation's shared tests: it runs the scenarios of pureconfig-derivation's UpstreamSemanticsSpec and asserts the same outcomes (values read, failure kinds and paths, written output), with sconfig's own failure types. The tables below describe the surface area we ship.
Semantics shared with PureConfig
Behaviour
Description
Failure accumulation
Every failing field of a case class is reported, then each unknown key of a strict one; every failing item of a collection and value of a map
Missing keys
KeyNotFound at the object that lacks the key, with upstream's candidate keys (KeyNotFound.forKeys); readers of missing keys (Option fields, ReadsMissingKeys readers) read the missing key instead (an Option reads it as None)
Failure paths
A missing key at the object, any other failure at the offending value (path lists keys / list indices from the value the reader was called with — sconfig readers read a ConfigValue, not a cursor)
Value that is not an object
Fails once (WrongType), not once per field
Discriminator (CoproductHint.Field, default type)
The value must be an object; the subtype is read without the discriminator key (strict subtypes don't see it as unknown); an unknown value fails with UnexpectedValueForFieldCoproductHint at the discriminator; writing a subtype that has a field named like the discriminator throws CoproductHintException(CollidingKeys)
No discriminator
A family of case objects is read only from strings (like deriveEnumerationReader; an unknown string fails with CannotConvert), other families from single-key objects
CoproductHint.FirstSuccess
Subtypes are attempted in the alphabetical order of their names (upstream's order), the first success wins; when none succeeds, NoValidCoproductOptionFound lists every attempt; written without disambiguation
Empty Option fields
Omitted when writing (upstream's WritesMissingKeys), not written as null
The unknown-string failure of a case-object family differs between PureConfig's Scala versions (NoValidCoproductOptionFound on 2.13, CannotConvert on 3); sconfig-derivation reports CannotConvert on both.
Type classes
Owned by the kindlings module — no extending of any third-party type, just a clean three-trait hierarchy:
Sanely-automatic — implicit on Scala 3 (given), explicit non-implicit on Scala 2 (to avoid clashing with the built-in instances under Scala 2 implicit-search rules)
derives ConfigReader (Scala 3)
Yes
Inline composition of ConfigCodec.derived from ConfigReader.derived + ConfigWriter.derived
Scala 3 — sidesteps sibling-splice isolation by running each derivation as its own top-level macro expansion
Single-macro Codec (ConfigCodec.derived)
Scala 2 — combines reader + writer in one macro expansion (no sibling-splice issue on Scala 2)
Unified Scala 2 + 3 API
Yes
Configuration
SConfig config class — same shape and same defaults as the PureConfig class in kindlings-pureconfig-derivation so users can move between the two modules with minimal mental overhead:
Field
Default
Description
transformMemberNames
ConfigFieldMapping(CamelCase, KebabCase)
Function applied to every case-class field name when reading/writing the HOCON key. Matches upstream PureConfig's ProductHint default.
transformConstructorNames
ConfigFieldMapping(PascalCase, KebabCase)
Function applied to every sealed-trait subtype name. Matches upstream PureConfig's FieldCoproductHint default.
discriminator
Some("type")
Discriminator field name. None switches to single-key wrapping ({"VariantName": {…}})
useDefaults
true
When a field is missing from the HOCON object, fall back to the case class's compile-time default value. Matches upstream.
allowUnknownKeys
true
When false, fails reading if the HOCON object has keys that don't correspond to any case-class field. Matches upstream ProductHint(allowUnknownKeys = …).
Convenience builders for sealed-trait subtype naming
withDiscriminator(field) / withWrappedSubtypes
—
Convenience builders for discriminator-vs-wrapping selection
withUseDefaults / withoutUseDefaults
—
Convenience builders for default-value handling
withAllowUnknownKeys / withStrictDecoding
—
Convenience builders for strict-mode toggling
Naming conventions live next to SConfig: CamelCase, PascalCase, KebabCase, SnakeCase, ScreamingSnakeCase, plus ConfigFieldMapping(source, target) for ad-hoc combinations. The tokeniser is implemented with a manual character-by-character loop (rather than the lookbehind regex upstream uses) so it works on Scala.js without forcing downstream projects into ES2018+ mode.
Per-type overrides via ProductHint / CoproductHint
The global SConfig is the default; per-type configuration is expressed via implicit type-indexed hints, mirroring upstream PureConfig's ProductHint[A] / CoproductHint[A]:
upstream pureconfig.FirstSuccessCoproductHint[A] — subtypes attempted in alphabetical order of their names, first success wins; written as is
The macro looks for an implicit hint at every case class / sealed family and falls back to the global SConfig when no hint is in scope. Annotations (@configKey, @transientField) always win over both layers.
Annotations
Annotation
Description
@configKey(name)
Override the HOCON key for a case-class field or a sealed-trait subtype. Takes precedence over transformMemberNames / transformConstructorNames.
@transientField
Skip a field during read and write. The field must have a compile-time default value, which is used as the placeholder when reading.
Built-in instances
Defined directly in the ConfigReader and ConfigWriter companion bodies (not in mixed-in traits — Scala 2 macro Implicits.search doesn't reliably pick up implicit vals declared in inherited traits). They participate in implicit resolution like any other type-class instance:
Type
Reader
Writer
Notes
String
Yes
Yes
Reader accepts numeric and boolean upstream values, coercing to string
Boolean
Yes
Yes
Int / Long / Short / Byte
Yes
Yes
Via Number.intValue() etc.
Float / Double
Yes
Yes
Char
Yes
Yes
Single-character string
BigDecimal / BigInt
Yes
Yes
Reader accepts both NUMBER and STRING upstream values
Option[A]
Yes
Yes
null / ConfigValueType.NULL ↔ None; otherwise recurses into inner. The reader is a ReadsMissingKeys (a missing key reads as None)
Collection (List, Vector, Seq, Set) and Map[String, A] readers / writers are deliberately not exposed as companion-level implicits because generic def iterableReader[A, Coll](implicit …): ConfigReader[Coll] would cause Scala 2's implicit search to diverge whenever it tries to resolve any unrelated ConfigReader[T]. Instead, the macro's HandleAsCollectionRule and HandleAsMapRule synthesise collection codecs directly from the structural pattern, which works for all standard collection types (and any user-defined IsCollection / IsMap provider) without needing companion-level implicits.
Type support
Feature
sconfig (raw)
Kindlings derivation
Notes
Primitives, String, BigDecimal, BigInt
Manual config.getString(path) / getInt(path)
Built-in instances
Option[A]
Manual if (config.hasPath) … else None
Built-in instance + macro HandleAsOptionRule
Missing key produces None automatically when the field type is Option[T]
List/Vector/Seq/Set
Manual iteration over ConfigList
Macro HandleAsCollectionRule
Works for any IsCollection provider
Map[String, A]
Manual iteration over ConfigObject entries
Macro HandleAsMapRule
Keys must be String
Case classes
Manual field-by-field reading
Macro HandleAsCaseClassRule
Honours @configKey, @transientField, useDefaults
Value classes / AnyVal wrappers
Manual unwrap
Automatic via IsValueType
Refined types (Scala 2 + Scala 3)
Manual validation
Automatic via kindlings-refined-integration (Either[String, A] wrap detected)
Iron (Scala 3 opaque types with constraints)
Not supported
Automatic via kindlings-iron-integration
neotype (Scala 3 Newtype/Subtype)
Not supported
Automatic via kindlings-neotype-integration (validated with the companion's make)
Auto-detected when all subtypes are case objects and no discriminator is set
Read only from strings; with a discriminator they are objects { type = name }
Scala 3 named tuples
Not supported
Yes
Recursive types
Yes (manual)
Yes (no wrappers needed)
Singletons (case object)
Yes
Yes
Cross-compilation
Feature
sconfig (raw)
Kindlings derivation
Scala 2.13 + Scala 3
Yes
Yes
JVM
Yes
Yes
Scala.js 1.x
Yes (with scala-java-time polyfill at the link stage)
Yes (test deps include scala-java-time to satisfy sconfig's transitive java.time.Duration reference)
Scala Native 0.5.x
Yes (with scala-java-time polyfill at the link stage)
Yes
Cross-module symmetry with kindlings-pureconfig-derivation
The two modules are deliberately built to be drop-in equivalents at the API surface level, so a project can swap which one it uses based on its target platform without changing call sites:
Concern
kindlings-pureconfig-derivation
kindlings-sconfig-derivation
Platform
JVM only
JVM + JS + Native
Underlying parser
com.typesafe:config (Java)
org.ekrich:sconfig (cross-platform Scala port)
Type-class hierarchy
KindlingsConfigReader extends pureconfig.ConfigReader, etc.
Checked against Tapir's own derivation, tapir-cats, tapir-iron, tapir-refined, neotype-tapir and tapir-newtype by the
upstream-oracle-tests module (the JSON Schemas rendered by Tapir's docs interpreter are compared on Scala 2.13 and 3;
also field descriptions on shared named map schemas, which Tapir's docs interpreter moves next to each $ref for both).
The only differences:
Difference
Tapir
Kindlings
Status
Required and optional fields
Optional: Options and collections
Optional exactly when the decoder derived with the same JSON config accepts the field missing (e.g. with circe, collections are required)
Design decision
Iron constraints
tapir-iron turns them into validators
The underlying type's schema; tapir-iron's schemas (with validators) are used when imported
Parity with tapir-iron imported
refined predicates
tapir-refined turns them into validators
The underlying type's schema; tapir-refined's schemas are used when imported
Parity with tapir-refined imported
neotype validate
neotype-tapir adds a custom validator (not rendered in JSON Schema)
The underlying type's schema; neotype-tapir's schemas are used when imported
Parity with neotype-tapir imported
Names of maps keyed by scala-newtype types (Scala 2.13)
Schema.schemaForMap[K, V] names the key after the type member (Name.Type: Map_Type_Int for every newtype)
Named after the companion (Map_Name_Int), as Iron RefinedType and neotype keys are on both sides
Improvement (tapir guide, "Maps, collections and other built-in types")
Type aliases among type arguments of names (e.g. refined's NonEmpty)
The alias' name
Dealiased (Not[Empty])
Documented (tapir guide)
Annotations
Feature
Tapir built-in
Kindlings
Status
@description
Yes
Yes
Parity
@title
Yes
Yes
Parity
@encodedName
Yes
Yes
Parity
@format
Yes
Yes
Parity
@hidden
Yes
Yes
Parity
@deprecated
Yes
Yes
Parity
@validate
Yes
Yes
Parity
@validateEach
Yes
Yes
Parity
@default
Yes
Yes
Parity
@encodedExample
Yes
Yes
Parity
@customise
Yes
Yes
Parity
Configuration
Feature
Tapir built-in
Kindlings
Status
Field naming
Independent sttp.tapir.generic.Configuration (must manually match JSON lib)
Discovers JSON lib config at compile time
Improvement
Discriminator
Independent (must manually match JSON lib)
Discovers JSON lib config at compile time
Improvement
JSON config consistency
No — schema and codec configs are separate, drift is common
Yes — automatically reads Circe/Jsoniter config via JsonSchemaConfigExtension
Improvement
Recursive types on Scala 3
Must use implicit def (not given), risk of deadlocks
Works
Improvement
Runtime type parameter resolution in SName
No — abstract type params in generic helpers produce ? in schema names
Resolves at runtime via runtimePlainPrint (e.g. Box[A] → SName("Box", List("SimplePerson")) when A = SimplePerson)
Improvement
Coproduct (sealed trait) schemas
Discriminator metadata is fully propagated to child schemas:
- Each child SProduct gets a discriminator field with single-value Validator.Enumeration
- encodedDiscriminatorValue attribute is set on each child schema
- Matches upstream Tapir's addDiscriminatorField behavior
With a jsoniter JsoniterConfig the schemas also describe the jsoniter codecs' wrapper-style ADTs (leaves wrapped in a
single-field object, case objects as strings), flattened nested hierarchies, @named leaves and fields, the
fully-qualified names passed to adtLeafClassNameMapper, Java enums / scala.Enumeration as strings (or ids), tuples as
arrays (prefixItems) and Option[Option[A]] as an ADT — see the Tapir Schema derivation guide.
Original type class — no replacement target. Provides compile-time derivation of combined encoder/decoder codecs for the UBJson (Universal Binary JSON) binary format. Uses a streaming reader/writer API for efficient serialization. Cross-compiled for Scala 2.13 + 3, JVM + JS + Native.
Type classes
Type class
Description
UBJsonValueCodec[A]
Combined encoder/decoder for UBJson binary format (streaming reader/writer)
Configuration
Config option
Default
Description
fieldNameMapper
identity
Transform field names (supports snake_case, kebab-case, PascalCase, SCREAMING_SNAKE_CASE)
adtLeafClassNameMapper
UBJsonConfig.simpleClassName
Transform sealed trait subtype names (receives the fully-qualified leaf name; the default keeps the simple name)
discriminatorFieldName
None
Discriminator field for sealed traits (wrapper encoding when None)
skipUnexpectedFields
true
Skip unknown fields during decoding
enumAsStrings
false
Encode case object enums as strings instead of objects
transientDefault
false
Omit fields with default values during encoding
transientEmpty
false
Omit empty collections during encoding
transientNone
false
Omit None fields during encoding
requireCollectionFields
false
Require collection fields to be present during decoding
requireDefaultFields
false
Require fields with defaults to be present during decoding
checkFieldDuplication
false
Check for duplicate field names during decoding
bigDecimalPrecision
34
Maximum precision for BigDecimal (DoS protection)
bigDecimalScaleLimit
6178
Maximum scale for BigDecimal (DoS protection)
bigDecimalDigitsLimit
308
Maximum digits for BigDecimal (DoS protection)
mapMaxInsertNumber
Int.MaxValue
Maximum map entries (DoS protection)
setMaxInsertNumber
Int.MaxValue
Maximum set entries (DoS protection)
useScalaEnumValueId
false
scala.Enumeration values as their ids
skipNestedOptionValues
false
Option[Option[A]] as a plain Option (otherwise the ADT Option, as jsoniter-scala)
scalaTransientSupport
false
scala.transient fields are transient
transientNull
false
Omit null fields of Scala 3 T \| Null types during encoding
circeLikeObjectEncoding
false
Without a discriminator, case objects as wrapped empty objects ({"Leaf":{}}) instead of strings
javaEnumValueNameMapper
identity
Transform Java enum constant names
bigIntDigitsLimit
308
Maximum digits for decoded BigInt (DoS protection)
requireDiscriminatorFirst
true
When false, the discriminator field may appear anywhere in the object
emptyCollectionsAsDefault
true
An empty array/object for a collection/map field with a default decodes as that default (withEmptyCollectionsAsEmpty sets false)
Annotations
Annotation
Description
@fieldName(name)
Rename a field in the UBJson representation
@transientField
Exclude a field from encoding/decoding (requires default value)
@stringified
No effect (UBJson numbers are typed binary values, there is no string form)
Yes (null for None; Option[Option[A]] as the ADT Option, or plain with skipNestedOptionValues)
Collections (List, Vector, etc.)
Yes (via Hearth IsCollection)
Map[K, V] (string keys)
Yes (UBJson object)
Map[K, V] (non-string keys: Int, Long, etc.)
Yes (array of key-value pairs)
Case classes
Yes (UBJson object with field names, all parameter lists)
Plain (non-case) classes
Yes (primary-constructor val/var parameters)
Scala 3 T \| Null
Yes (null or a T)
Nested sealed hierarchies
Yes (flattened to their leaves)
Value classes
Yes (automatic unwrapping)
Sealed traits (wrapper encoding)
Yes (single-key object wrapping subtype name)
Sealed traits (discriminator encoding)
Yes (via discriminatorFieldName config)
Case object enums
Yes (object or string encoding via enumAsStrings)
Mixed enums (case objects + case classes)
Yes
Singletons (case objects)
Yes
Generic types (Box[A], Pair[A, B])
Yes
Higher-kinded types (F[_])
Yes
Recursive types
Yes
Nested structures (arbitrary depth)
Yes
Type aliases
Yes
Codec extensions
UBJsonValueCodecExtensions provides map and mapDecode combinators for transforming existing codecs, enabling support for custom types by mapping to/from supported types.
upstream-oracle-tests (scala-3/YamlOracleSpec, Scala 3 only, as scala-yaml's derivation) derives the same fixtures
with Kindlings (default YamlConfig) and with scala-yaml's YamlCodec.derived, and compares the encoded YAML nodes
(values and tags) and the decoded values of valid and invalid inputs, including failure messages. Products, Option
fields (an absent one is None), constructor defaults, primitives, collections, maps, nested case classes, sealed traits
(untagged, overlapping subtypes and case objects attempted in declaration order) and Scala 3 enums have no
differences. The suite also checks that the opt-ins differ as intended:
Opt-in
scala-yaml
Kindlings
withoutUseDefaults
Absent field with a constructor default uses it
Fails (Key x doesn't exist in parsed document)
withWrappedSubtypes
Subtype written untagged; decoding tries every subtype
Single-key mapping { Subtype: { ... } }
withDiscriminator(field)
(as above)
The subtype's name in field
withEmptyCollectionsAsFlow
toYamlString: an empty collection printed as an empty value, which does not decode back
Printed as [] / {} (also nested), decodes back
Kindlings additions without a scala-yaml counterpart: union types are always wrapped; Java enum / scala.Enumeration
values are written as their names.
Printing is scala-yaml's (toYamlString prints the encoded node with scala-yaml's Node#asYaml), so it behaves the
same, including one upstream limitation the oracle pins: an empty sequence or mapping is printed as an empty value
(children: instead of children: []), which reads back as null, so YAML printed from a value with an empty
collection field does not decode back (Could't construct scala.collection.immutable.List from null). Decoding from the
encoded Node (KindlingsYamlDecoder.decode(KindlingsYamlEncoder.encode(value))) round-trips, as does YAML using the
flow style [] / {}, which the opt-in withEmptyCollectionsAsFlow makes toYamlString print.
Always on, not configurable (compile-time macro reflection)
On by default, configurable (withoutUseDefaults), compile-time
Improvement
xml-derivation
Original type class — no replacement target. Provides compile-time derivation of XML encoders and decoders using scala.xml.Elem as the XML representation. Fields can be mapped to XML elements, attributes, or text content via annotations. Decoders return Either[XmlDecodingError, A] for safe error handling. Cross-compiled for Scala 2.13 + 3, JVM + JS + Native.
Type classes
Type class
Description
XmlEncoder[A]
Encodes a value to scala.xml.Elem with a given element name
XmlDecoder[A]
Decodes a scala.xml.Elem to Either[XmlDecodingError, A]
Default mapping for fields: Element (child elements) or Attribute (XML attributes, for single text values: primitives, String, BigDecimal, BigInt, value types over them and Options of these; collections, maps, case classes and sealed traits stay child elements). Encoder and decoder follow the same rule
fieldNameMapper
identity
Transform field names (supports snake_case, kebab-case, PascalCase, SCREAMING_SNAKE_CASE)
constructorNameMapper
identity
Transform sealed trait subtype names for discriminator values
discriminatorAttribute
Some("type")
Attribute name for sealed trait discrimination (None to disable)
enumAsStrings
false
Encode case object enums as text content strings
useDefaults
false
Use constructor default values for missing fields (child elements or attributes) during decoding
transientNone
false
Omit None fields during encoding
transientEmpty
false
Omit empty collections during encoding (empty strings are still written)
Annotations
Annotation
Description
@xmlName(name)
Rename a field/subtype in the XML representation
@transientField
Exclude a field from encoding/decoding (requires default value)
@xmlAttribute
Force a field to be encoded/decoded as an XML attribute
@xmlElement
Force a field to be encoded/decoded as a child XML element
@xmlContent
Map a field to the text content of the enclosing element
@xmlWrapper(name)
Wrap a collection field in an additional element with the given name
@xmlUnwrapped
Inline collection elements directly without a wrapper element
XmlDecodingError is a sealed hierarchy providing structured errors:
Error type
Description
MissingAttribute
Required XML attribute not found
MissingElement
Required child element not found
InvalidValue
Text content cannot be parsed to expected type
UnexpectedElement
Unknown child element encountered
MissingContent
Element has no text content
UnknownDiscriminator
Discriminator value doesn't match any known subtype
MissingDiscriminator
Discriminator attribute not found on element
Multiple
Aggregation of multiple errors
General
Catch-all for other error conditions
fast-show-pretty
Original type class — no replacement target. Provides configurable pretty-printing with indentation support for case classes, collections, maps, and primitives. Cross-compiled for Scala 2.13 + 3, JVM + JS + Native.
Annotations
Annotation
Target
Description
@sensitiveData
Field or type
Replaces the rendered value with [redacted]
@sensitiveData("reason")
Field or type
Replaces the rendered value with [redacted: reason]
jsoniter-json
Replaces: jsoniter-scala-circe's JsoniterScalaCodec.jsonC3c with circe's Json / JsonNumber / JsonObject
Checked against jsoniter-scala-circe and circe's JSON model by the upstream-oracle-tests module
(JsoniterJsonOracleSpec): parsing (accepted inputs, structure, key order, number text, nesting depth), printing
(escaping, number formatting), numeric conversions of parsed and constructed numbers, JsonNumber.fromString,
equality, and the Json/JsonObject API.
Feature
circe + jsoniter-scala-circe
Kindlings
Status
Parsing and printing
Numbers keep their text (also -0), max depth 128
Same (JsonCodec.withMaxDepth(n) for another limit)
Parity
toInt / toLong / toBigInt / toBigDecimal
Exact, for integral values however written
Same
Parity
toDouble / toFloat
Plain values (infinity when out of range)
Option
Difference (API)
Duplicate keys
One value per key (last wins)
Kept (ordered fields; apply returns the last value; add appends)
Difference (design)
Equality
Numbers by value, objects as maps
Structural (number text, ordered fields)
Difference (design)
JsonNumber.fromString
Also accepts 01, .5 (and writes them as invalid JSON)