Any tips and tricks for preventing unbearably long output when comparing long seqs of maps where only some maps in the middle are different?
(matcher-combinators.config/enable-abbreviation!)
it is experimental and I've found it to be annoying at times (though I have it on by default)
(I guess the context is in https://github.com/nubank/matcher-combinators/pull/214)
thanks. my context: https://github.com/clj-kondo/clj-kondo/actions/runs/16747800247/job/47410397807
Now the output is much better, but ... now it's kind of hard to see where to look laughcry
FAIL in (clj-kondo-diff-test) (diff_test.clj:39)
expected: (match? (clojure.core/map clj-kondo.test-utils/normalize-map-paths expected__20564__auto__) (clojure.core/map clj-kondo.test-utils/normalize-map-paths actual__20563__auto__))
actual: (...
{:end-row (mismatch (expected 211) (actual 210)),
:row (mismatch (expected 211) (actual 210))}
{:end-row (mismatch (expected 212) (actual 211)),
:row (mismatch (expected 212) (actual 211))}
{:end-row (mismatch (expected 213) (actual 212)),
:row (mismatch (expected 213) (actual 212))}
{:end-row (mismatch (expected 215) (actual 214)),
:row (mismatch (expected 215) (actual 214))}
{:end-row (mismatch (expected 216) (actual 215)),
:row (mismatch (expected 216) (actual 215))}
{:end-row (mismatch (expected 225) (actual 224)),
:row (mismatch (expected 225) (actual 224))}
{:end-row (mismatch (expected 229) (actual 228)),
:row (mismatch (expected 229) (actual 228))}
{:end-row (mismatch (expected 243) (actual 242)),
:row (mismatch (expected 243) (actual 242))}
{:end-row (mismatch (expected 249) (actual 248)),
:row (mismatch (expected 249) (actual 248))}
{:end-row (mismatch (expected 253) (actual 252)),
:row (mismatch (expected 253) (actual 252))}
{:end-row (mismatch (expected 260) (actual 259)),
:row (mismatch (expected 260) (actual 259))}
{:end-row (mismatch (expected 262) (actual 261)),
:row (mismatch (expected 262) (actual 261))}
{:end-row (mismatch (expected 269) (actual 268)),
:row (mismatch (expected 269) (actual 268))}
{:end-row (mismatch (expected 273) (actual 272)),
:row (mismatch (expected 273) (actual 272))}
{:end-row (mismatch (expected 277) (actual 276)),
:row (mismatch (expected 277) (actual 276))})
yeah, that is my problem with the feature as well
Maybe I should transform the output first and then diff as just plain text
difftastic is kind of good here:
it's kind of a drag to install difftastic everywhere in my CI envs so I tried deep-diff2 but it does something similar:
[{:end-row -210 +211, :row -210 +211}
{:end-row -211 +212, :row -211 +212}
{:end-row -212 +213, :row -212 +213}
{:end-row -214 +215, :row -214 +215}
{:end-row -215 +216, :row -215 +216}
{:end-row -224 +225, :row -224 +225}
{:end-row -228 +229, :row -228 +229}
{:end-row -242 +243, :row -242 +243}
{:end-row -248 +249, :row -248 +249}
{:end-row -252 +253, :row -252 +253}
{:end-row -259 +260, :row -259 +260}
{:end-row -261 +262, :row -261 +262}
{:end-row -268 +269, :row -268 +269}
{:end-row -272 +273, :row -272 +273}
{:end-row -276 +277, :row -276 +277}]