softwaremill/diffx

Can't derive Diff for a case class with all default arguments

laughedelic opened this issue · 6 comments

Example:

import com.softwaremill.diffx.Diff

// both args have defaults:
case class Buh(
  a: String = "",
  b: Int = 1
)

// fails
Diff[Buh]

Here is a runnable snippet:
https://scastie.scala-lang.org/kKEQ1SZzTmudSGJGvO5BGg

This broke with the Magnolia version upgrade: #93

I tried overriding Magnolia version to the latest, but it didn't help. Using latest Diffx with overriden Magnolia 0.12.8 does work.

So I know it's a problem with Magnolia, but I thought it's worth reporting here first. Let me know if I should report it there instead.

Actually I think it's this one: softwaremill/magnolia#227 and the fix is already in the queue: softwaremill/magnolia#230.

Feel free to close this issue.

Hi,

Thanks for reporting. I've just released new version 0.3.26 with updated magnolia, so it should be available in maven central within a couple of hours.

Thanks for the fast reaction!

@ghostbuster91 I think the version with the fix is 0.14.3: softwaremill/magnolia@v0.14.2...v0.14.3
And Diffx 0.3.26 is updated to 0.14.2. Could you release another upgrade?

@laughedelic Lol,I didn't expect that :) Sure, new release is rolling....

Thanks again!