softwaremill/diffx

Objects with multi-line toString method are not rendered properly in diff results

UnaiUribarri-TomTom opened this issue · 3 comments

I have problem rendering results in a class like this:

// Some classes defined in https://github.com/openstreetmap/OSM-binary/blob/master/osmpbf/osmformat.proto
import org.osm.protobuf.Node
import org.osm.protobuf.Way
import org.osm.protobuf.Relation 

case class GeoMap(nodes: Seq[Node], ways: Seq[Way], relations: Seq[Relation])

Inner objects (Node, Way, Relation) are not properly indented and also, only the first line is highlighted when there is a difference.

I have posted PR #432 that resolves both issues.

I realised that the example provided did not trigger the issue. The issue was caused by a list of protobuf objects; protobuf defines a toString method that produces a multiline result. Updated the title of this issue.

New version has been released with #432, should we close the issue?

Thanks I've just noticed that the release build failed. I will try to fix it and retry later today.