ducktape 0.2.7
This release brings two new config options: Field.computedDeep
and Field.fallibleComputedDeep
that allows you to compute a field by using the closest possible source value:
case class SourceToplevel1(level1: Option[SourceLevel1])
case class SourceLevel1(level2: Option[SourceLevel2])
case class SourceLevel2(level3: SourceLevel3)
case class SourceLevel3(int: Int)
case class DestToplevel1(level1: Option[DestLevel1])
case class DestLevel1(level2: Option[DestLevel2])
case class DestLevel2(level3: Option[DestLevel3])
case class DestLevel3(int: Long)
val source = SourceToplevel1(Some(SourceLevel1(Some(SourceLevel2(SourceLevel3(1))))))
val expected = DestToplevel1(Some(DestLevel1(Some(DestLevel2(Some(DestLevel3(11)))))))
assertTransformsConfigured(source, expected)(
Field.computedDeep(_.level1.element.level2.element.level3.element.int, (int: Int) => int.toLong + 10)
)
while also 'cutting through' Options, collections and other things that disallowed using 'Field.computed' in the past.
What's Changed
- intial set of scaladoc (only for syntax methods for now) by @arainko in #216
- disable bsp for non-jvm projects by @arainko in #218
- Update sbt, scripted-plugin to 1.10.4 by @scala-steward in #217
- [Issue 199] Add
Field.computedDeep
andField.fallibleComputedDeep
by @arainko in #220 - Update sbt, scripted-plugin to 1.10.5 by @scala-steward in #221
- Update auxlib, clib, javalib, nativelib, ... to 0.5.6 by @scala-steward in #222
- Update sbt, scripted-plugin to 1.10.6 by @scala-steward in #223
- Update munit to 1.0.3 by @scala-steward in #224
- Update sbt-mdoc to 2.6.2 by @scala-steward in #225
- Field renames - preliminary work by @arainko in #226
- Update sbt, scripted-plugin to 1.10.7 by @scala-steward in #227
Full Changelog: v0.2.6...v0.2.7