chimney
chimney copied to clipboard
Scala library for boilerplate-free, type-safe data transformations
Reproducing example: ```scala object ChimneyBug extends App { import io.scalaland.chimney.dsl.* import java.util.UUID case class From(x: String) case class To(uuid: UUID, setUuid: UUID, x: String) val result: To = From("meh").into[To] .withFieldConst(_.uuid,...
Compilation of partial transformation fails when there are fields named both `is{Name}` and `{name}`
**Describe the bug** Compilation of partial transformation fails when the destination type contains fields named both `is{Name}` and `{name}`, Compilation succeeds when adding `.withFieldComputed(_.isName, _.isName)`, but fails with `.withFieldRenamed(_.isName, _.isName)`...
Some users would find it useful to be able to fail compilation if some/all fields from source were not used during derivation. Example of such thing was asked in this...
It would be useful if we created in cookbook sections explaining how to use Chimney if someone has an experience in another library. What comes to mind: * [Automapper](https://docs.automapper.org/en/stable/) (C#/.Net)...
While migration to MkDocs was rather successful, there are at least 3 things that could be improved: 1. generating offline documentation - it probably might require tinkering with [PDF/ePUB builds](https://docs.readthedocs.io/en/stable/tutorial/index.html#enabling-pdf-and-epub-builds)...
**Describe the desired behavior** I would like to have an option to convert data structures with more functional data types like cats.data.NonEmptyList[T] to scala.collection.immutable.Seq[T] (could be a case where this...
Currently the only kinds support for singleton types we have are: - `case object`s (Scala 2 & 3) and parametherless `enum` `case`s (Scala 3) - filling `Unit` as constructor parameter/setter...
In some cases there is one value which could be used as a default value for a certain type, but: - we would like to avoid passing it manually into...
Allow something like ```scala enum Foo: case Baz, Baz1 enum Bar: case Baz, Baz2 foo.into[Bar].withSealedSubtypeRenamed[Foo.Baz1.type, Foo.Baz2.type].transform foo.into[Bar].withEnumCaseRenamed[Foo.Baz1.type, Foo.Baz2.type].transform ``` Implementation would require: - adding new case in `runtime.TransformerOverride` - adding...
Once support for features currently supported in 2.13 is provided for Scala 3, add tests and later implementations verifying work with Scala 3 specific features: - cross-compilations with 2.13 -...