Gabriella439 / nix-diff

Explain why two Nix derivations differ
BSD 3-Clause "New" or "Revised" License
357 stars 19 forks source link

Consider `myers-diff` package #78

Open sorki opened 12 months ago

sorki commented 12 months ago

For faster diffing

https://www.reddit.com/r/haskell/comments/17hznjg/introducing_myersdiff_a_fast_text_diffing_library/

https://hackage.haskell.org/package/myers-diff

SuperSandro2000 commented 11 months ago

Would this also improve the diff displayed to the end user to be more like git-diff?

sorki commented 11 months ago

I'm not quite sure - need to take a better look. I've thought this package uses Diff package but it actually uses patience which implements a different algorithm. We could possibly make it selectable just like git diff allows different algos (--diff-algorithm={patience|minimal|histogram|myers}, looks like the default one for git diff is actually Myers diff!)

sorki commented 11 months ago

Looking at the commits, Diff was used previously and was switched to patience in #33.

Wanna take a stab at this @SuperSandro2000?

SuperSandro2000 commented 11 months ago

I have literally zero haskell experience and way to many other projects running currently to dive into this.

sorki commented 11 months ago

It can wait. Haskell can help with too many projects :wink: also this one could be a good start as it isn't too difficult (the code was already written before, just needs forward porting and a command line switch).