Skip to content

v1.0.0

Compare
Choose a tag to compare
@MateuszKubuszok MateuszKubuszok released this 23 May 04:49
· 179 commits to master since this release

Release 1.0.0 is the culmination of 7 years of development.

If you are curious about the migration from 0.8.x you'll find the guideline here (tl;dr there should be nothing to worry about as long as you recompile).

Changelog since 0.8.x:

  • revamped Cats' instances to match existing conventions (both in Cats as well as in Chimney) (fixed in #443)
    • Transformer, PartialTransformer and partial.Result have all instances that make sense for them
    • conversions from cats.Validated to partial.Result use the same convention as other types (using AsResult type class and asResult extension method introduced in 0.8.0)
    • for partial.Result and PartialTransformer one can combine values using sequential or parallel semantics (read about them in the docs!!!)
    • all instances are tested against Cats disciplines
  • further improvements to Cats' instances for Chimney types - added Alternative type class to the list of provided instances, a few missed discipline tests were added (#465)
  • provided a flag to disable automatic Option unwrapping by PartialTransformer (#322, addressed by #477) (disabling that behavior by default is not planned)
  • added a way to customize how source fields/subtypes are matches against target fields/subtypes (#89 and #480, fixed in #478) - thanks to @saeltz for contributing to the PR as the first contribution!
  • restored the behavior from before 0.8.x series when only methods returning Unit could be considered setters (provides a better fix to #424, fixed in #485). If needed non-Unit setters can be opted-in
  • detect and report ambiguities with pairing field names (#449, #461, fixed in #485)
  • improve error messages when there are def methods or other inherited accessors that could be enabled with a flag (fixed in #485)
  • type-level config representation and internal macros overrides get heavily refactored (#490, #491, #492) (breaking change!)
  • which unblocked the development of better nested paths (#493):
    • now it is possible to use overrides like withFieldConst(_.adt.matching[ADT.Subtype].either.matchingRight.collection.everyItem.map.everyMapValue, ...)
    • in this first iteration, improved paths to overridden values support only build-in Scala types: Option (matchingSome), Either (matchingLeft, matchingRight), Scala's collections (.everyItem, .everyMapKey, .everyMapValue) but it is planned to extends support for other collections
  • suppress WartRemover/Scapegoat warnings (#496, fixe),d in #497)
  • deprecate withCoproductInstance in favor or withSealedSubtypeHandled and withEnumCaseHandled (fixed in #500) - old name is still available but it was @deprecated since it uses the term "coproduct" basically unknown outside of library writers crowd
  • documentation now has light/dark theme toggle with the default being whatever your system uses
  • fixed to internal representation of subtype-matchiung configs (#499, fixed in #504)
  • format scaladoc documentation with scalafmt wrap = yes config
  • fix a bug that occurred in some cases when using withConstructorPartial (fixed in #508)
  • add withContructorEither in PartialTransformers to make it easier to work with smart constructors based on Either[String, Type] (done in #509)
  • created an integration API for providing custom optional types and custom collections (#505)
    • extended support for _.matchingSome, _.everyItem, _.everyMapKey,_.everyMapValue to every collection provided through integrations API
  • migrated chimney-java-collections through new integration API (#510)
  • provided support for transformation of cats.data types like Chain, NonEmptyChain, etc through integrations API (#421, fixed in #511)
  • allow providing an override to a field shared between all subtypes of an ADT (sealed, enum) (#512)
  • fix rare case of StackOverflow with Scala 3 enums (#528)
  • hide the last API intended for internal usage (#540)
  • tests Scala CLI snippets (#523, #524, #534) and extract snippet testing to an external library ScalaCLI.md Spec (#525)