ducktape 0.2.0
ducktape 0.2.0
First of all, head on over to the new docs site.
The library has been rebuilt from the ground-up to not rely on automatic derivation of Transformer
and Transformer.Fallible
and enable further development of more advanced features (the examples of which are nested configurations and support for regional configs like Field.fallbackToDefault
- with more still to come). All of that should result in a much higher quality of code that gets generated underneath (for example, fallible transformations do not generate interim Transformer.Fallible
instances anymore).
While this release is not binary-compatible with ducktape 0.1.x
, it's aiming to be as source-compatible as possible. All the known breakages are documented in the Coming from 0.1.x section of the docs. There are also a bunch of deprecated forwarders with (hopefully) user-friendly tips on how to make the deprecation warnings go away.
New highlight features
-
ability to configure deeply nested transformations without having to resort to building out new
Transformer
instances, best showcased in theConfiguring transformations
section of the docs -
revamped error reporting - errors are now accumulated and shown at once and are supposed to be actionable e.g. in case of a field that's missing it'll give the user a hint and a path to that field for usage in one of the configuration options, for example:
No field 'name' found in MdocApp0.this.wire.PaymentMethod.Card @ Person.paymentMethods.element.at[MdocApp0.this.domain.Payment.Card].name
More information is available in the
Motivating example
section of the docs. -
new flavor of configuration options - regional configs:
Field.fallbackToDefault
for falling back to default values in cases where a transformation couldn't be derived,Field.fallbackToNone
for falling back toNone
forOption
fields for which a transformation couldn't be derived
Regional configs can be made to work in only user-selected subregions of the transformations, eg.:
Field.fallbackToDefault.regional(_.field1.at[Case1])
will make it apply only 'below'
field1
at it'sCase1
subtype. More info and examples are available inConfiguring transformations
What's Changed
- Update versions in README by @arainko in #141
- Update sbt-typelevel-ci-release to 0.6.7 by @scala-steward in #148
- Update scalafmt-core to 3.8.0 by @scala-steward in #147
- Update munit to 1.0.0-M11 by @scala-steward in #146
- Update scala3-library, ... to 3.3.3 by @scala-steward in #145
- Update sbt-scalajs, scalajs-library_2.13, ... to 1.16.0 by @scala-steward in #144
Full Changelog: v0.2.0-RC1...v0.2.0