Skip to content

Releases: scalalandio/chimney

v1.0.0-M2

22 Mar 13:29
Compare
Choose a tag to compare
v1.0.0-M2 Pre-release
Pre-release

Changelog:

  • 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)

This pre-release is the second from the planned series of internal cleanups. The series is intended to make sure that when 1.0.0 is finally released it will not have any serious (known) issues that could be only addressed by breaking the backward compatibility. We will be really glad if you tested it, and let us know about any such issues while they are still easy to fix.

v1.0.0-M1

11 Jan 11:31
Compare
Choose a tag to compare
v1.0.0-M1 Pre-release
Pre-release

Changelog:

  • 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

This pre-release it the first from the planned series of internal cleanups. The series is intended to make sure that when 1.0.0 is finally released it will not have any serious (known) issues that could be only addressed by breaking the backward compatibility. We will be really glad if you tested it, and let us know about any such issues while they are still easy to fix.

v0.8.5

02 Jan 13:19
Compare
Choose a tag to compare

Changelog:

Announcement

The past year was fully dedicated to creating a reliable 0.8.x line:

  • addressing the tech debt and sorting out the internals - it was needed not only to enable Scala 3 support but also
    to unblock any future work - both new features as well as bugfixes - in a codebase of evergrowing complexity. I'd argue
    that this was more of an issue than the differences between Scala 2 and Scala 3 macro API, even though from the outside
    it might see as if the changes in the macro API were the main showstopper
  • providing a support for Scala 3 - it's the most visible outcome of 0.8.0 release
  • providing new features - some of them requested years ago! - enabled by the internals refactor:
  • making the experience of working with PartialTransformers smoother, so that people could move away from TransformerF -
    having one dedicated result type make it easier to write reliable code without giving up on optimizations
  • providing better integrations for Protobufs and kicking off integration for Java Collections
  • stabilizing the API so that every other version would be a breaking change - since 0.8.0-RC1 we started checking for binary
    backward compatibility (as source compatibility is checked by tests)

That work was enabled by the 0.7.x line when we introduced PartialTransformers - it was then that we understood that TransformerF while useful, are

  • too complex for most of the users - who only need something slightly better than Either[List[String], A] and working OOTB
  • and too constraining for us - while we could assume that F is a monad or an applicative, the blackbox-ness of the arbitrary effect tied our hands when we wanted to optimize the code for the most common cases. Also we had to shove 1 or sometimes 2 extra type classes around in macros (TransformerFSupport and optional TransformerFErrorPathSupport - I wonder how many of you ever tried to provide your own instance for any of them rather than using some of the build-ins).

The work we did back then was both to improve the UX and to make the eventual refactor easier. We had to plan ahead.

Just like we are planning ahead now. We want to get to Chimney 1.0.0 in 2024. This will stabilize the API and behavior for years, and stable libraries is what we need right now.

Getting stable means many good things: users would be able to fearlessly update dependencies, no migration guides from one version to another would be needed, tutorials and examples will not go out of date.

But it also means that whatever API quirks we have will be to stay. At best we could provide a better API and deprecate the old one, but any improvement which would require e.g. changing how implicits works, changing what is enabled by default, optimization requiring different API representation (even if for kinda-internal type) would be rejected.

That's also one of the reasons why 0.8.x line attempted to push out as many features as it could while keeping backward compatibility - to encourage people to try out 0.8.x and give us some feedback. So that we could make the good use of one last breaking change opportunity - the future 1.0.0-RC line - to address as many issues (fixable only with breaking changes) as possible before committing to stability for years.

Mind, that it doesn't mean that the work would stop (although at some point a mature library with a defined scope needs less and less attention). It also doesn't mean that update to 1.0.0 would require of you any serious rewrites - the vast majority of changes that I have in mind right now would not change your code, only how implicits and internal data structures are organized.

Still, some of the current behavior might be undesirable. It might make sense to change it. Perhaps some of the undesirable behavior might come from poor explanation what is the intended use case for e.g. PartialTransformers and lack of best practices and sources on how to use them. Then we will improve the documentation, write blog posts, do presentations. Or perhaps it is a legitimate concern, and changing that behavior for every user would save them more pain than it causes.

But we would only know about your pain points if you test how 0.8.x works for you and gives us some feedback, so if you are using Chimney and have some issues with it, or if something is preventing you from using it, let us know!

v0.8.4

18 Dec 21:20
Compare
Choose a tag to compare

Changelog:

v0.8.3

20 Nov 11:43
Compare
Choose a tag to compare

Changelog:

  • allow ignoring set methods (#424, fixed in #432)
  • allow using fallback values (defaults if enabled/None's for Options if enabled, Unit) when transforming from/to Tuples (#434, fixed in #436) - thanks to @coreyoconnor for finding and fixing the bug as the first contribution!

v0.8.2

06 Nov 11:25
Compare
Choose a tag to compare

Changelog:

  • allow using nested paths in withFieldConst[Partial], withFieldComputed[Partial] and withFieldRenamed (#358, fixed in #419)
  • allow using nullary methods in DSL to e.g. withFieldRenamed(_.accessorMethod(), _.getFieldName) (#403, fixed in #419)
  • allow using product overrides (withField* methods) to set/compute AnyVal's inner value
  • minor bug fixes

v0.8.1

30 Oct 23:45
Compare
Choose a tag to compare

Changelog:

  • Fix transforming into case class with var fields (#400, fixed in #401), thanks to @hughsimpson for finding and fixing the bug as the first contribution!
  • Fix preventing to use implicits if .into.transform sets any flag (before it prevented it only for override with a value/function) (#413, fixed in #412)
  • Enable Inkuire in Scala 3's Scaladocs searching (#399 , fixed in #402)

v0.8.0

12 Oct 10:07
Compare
Choose a tag to compare

The final and stable release of 0.8.0. The reasons to update (if you are still on 0.7.x or earlier) are:

  • full feature parity between Scala 2.12, 2.13 and 3, JVM, Scala.js and Scala Native - each feature works on each version and platform!
  • better support for Protobufs and Java's build-in types (added Java's enums and collections!, customizations can be used with Java Beans!)
  • added ability to log the whole macro derivation logic!
  • a lot of bugfixes

That and more described in a new, better documentation!

Changelog since 0.7.x:

  • 0.8.0:

    • refreshed documentation (#395, fixed in #396) - see https://chimney.readthedocs.io/en/stable/
      • in case you need to access old docs - Read the Docs host versioned documentation so you can access all previous versions up to 0.5.0
    • add Java's enum support (#393 using work spearheaded by @koiuo) and integration for Java's collections (#391) (fixes #86)
    • add ScalaPB build-in types integartions (#394, fixed in #390)
    • started checking MiMa for backward compatibility (#385, checks since 0.8.0-RC1)
    • fix a bug with parsing type information (#397)
  • 0.8.0-RC1:

    • enabled -Xcheck-macros check on Scala 3 and fixed discovered errors (#346 fixed by #351) - big thanks to @jchyb!
    • re-enabled -Xfatal-warnings (fixed in #373)
    • re-enabled compilation error message format check on Scala 3 (#354) - in 0.8.0-M1 error messages were present but there were slight differences between Scala 2 and 3, now errors message format are aligned: format of type printing and names of vals generated inside macro are consistent between Scala versions
    • allow searching for vals/lazy vals/defs inheritend for parent classes/traits (#144 fixed by #374 )
    • in order to limit amount of stable releases with breaking changes (0.8.0-M1 already had to introduce such changes, therfore 0.7.x -> 0.8.0 is already such a release, but we want to avoid the need to release 0.9.0 immediatelly after) some planned changes (which broke binary compatibility but usually NOT source compatibility) were already added to this release
      • Patchers can use PatcherConfiguration the same way as Transformers with TransformerConfiguration (#190 fixed by #355)
      • since nested paths in withField* methods are planned necessary changes in API to make it possible were made (#377 unblocking #358 in the future)
      • an alternative to import dsl.* was introduced allowing users to use only semiautomatic versioning (#166 fixed by #357)
  • 0.8.0-M1:

    • major refactor-rewrite to enable further library development in #325
    • added initial Scala 3 support - solved #201 in #325 - great thanks to @jchyb whose continuous help us removing one blocker after another, without him this release would come out much, much later!
      • detailed list of related tasks is available at scala-3 milestone
      • this is a milestone release precisely because due to the rewrites - all feedback is welcome!
    • hid internal helpers from polluting the DSL in #334
    • added ability to preview macros and log the derivation logic in #317 - see debugging macros for details
    • improved support for Protobuf oneofs in #331, see oneof fields for details
    • improved support for Java Beans - solved #110 and #175
    • Transformer type class was split into Transformer and Transformer.AutoDerived, similarly PartialTransformer, see migration-to-0.8 to read how it could affect you
    • default values (when enabled) are no longer used as fallback if there is field from which value can be converted but transformation cannot be resolved - solved #200
    • locally defined implicits are no longet ignored in some cases - solved #207
    • removed deprecated features: lifter transformers and unsafeGet, see migrating from lifted if you haven't done it yet
    • added MiMa checks to sbt configuration - in #329 solving #252 thanks to @RayanRal!

Greatest thanks to @jchyb for helping us again unblock the works on the 0.8.0, his consultations were critical.

v0.8.0-RC1

15 Sep 12:46
Compare
Choose a tag to compare
v0.8.0-RC1 Pre-release
Pre-release

Changelog:

  • enabled -Xcheck-macros check on Scala 3 and fixed discovered errors (#346 fixed by #351) - big thanks to @jchyb!
  • re-enabled -Xfatal-warnings (fixed in #373)
  • re-enabled compilation error message format check on Scala 3 (#354) - in 0.8.0-M1 error messages were present but there were slight differences between Scala 2 and 3, now errors message format are aligned: format of type printing and names of vals generated inside macro are consistent between Scala versions
  • allow searching for vals/lazy vals/defs inheritend for parent classes/traits (#144 fixed by #374 )
  • in order to limit amount of stable releases with breaking changes (0.8.0-M1 already had to introduce such changes, therfore 0.7.x -> 0.8.0 is already such a release, but we want to avoid the need to release 0.9.0 immediatelly after) some planned changes (which broke binary compatibility but usually NOT source compatibility) were already added to this release
    • Patchers can use PatcherConfiguration the same way as Transformers with TransformerConfiguration (#190 fixed by #355)
    • since nested paths in withField* methods are planned necessary changes in API to make it possible were made (#377 unblocking #358 in the future)
    • an alternative to import dsl.* was introduced allowing users to use only semiautomatic versioning (#166 fixed by #357)

This release closes all the work intended for 0.8.0 release. Unless any serious bugs are found in the fear future final 0.8.0 will be released. Adding new features and fixing bugs found in much later will be done one future 0.8.x versions.

Great thanks to @jchyb for helping us again unblock the works on the 0.8.0, his consultations were critical for this release.

v0.8.0-M1

03 Aug 21:36
Compare
Choose a tag to compare
v0.8.0-M1 Pre-release
Pre-release

Change log:

  • major refactor-rewrite to enable further library development in #325
  • added initial Scala 3 support - solved #201 in #325 - great thanks to @jchyb whose continuous help us removing one blocker after another, without him this release would come out much, much later!
    • detailed list of related tasks is available at scala-3 milestone
    • this is a milestone release precisely because due to the rewrites - all feedback is welcome!
  • hid internal helpers from polluting the DSL in #334
  • added ability to preview macros and log the derivation logic in #317 - see debugging macros for details
  • improved support for Protobuf oneofs in #331, see oneof fields for details
  • improved support for Java Beans - solved #110 and #175
  • Transformer type class was split into Transformer and Transformer.AutoDerived, similarly PartialTransformer, see migration-to-0.8 to read how it could affect you
  • default values (when enabled) are no longer used as fallback if there is field from which value can be converted but transformation cannot be resolved - solved #200
  • locally defined implicits are no longet ignored in some cases - solved #207
  • removed deprecated features: lifter transformers and unsafeGet, see migrating from lifted if you haven't done it yet
  • added MiMa checks to sbt configuration - in #329 solving #252 thanks to @RayanRal!