Diffx supports auto and semi-auto derivation.

For semi-auto derivation you don’t need any additional import, just define your instances using:

import com.softwaremill.diffx._
case class Product(name: String)
case class Basket(products: List[Product])

implicit val productDiff = Diff.derived[Product]
implicit val basketDiff = Diff.derived[Basket]

To use auto derivation add following import


or extend trait

Auto derivation might have a huge impact on compilation times, because of that it is recommended to use semi-auto derivation.