Gabriella439 / nix-diff

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

[#58] Add intermediate representation #59

Closed s-and-witch closed 1 year ago

s-and-witch commented 1 year ago

Problem: There is no way to reuse the result of diff algorithm because program print it into stdout in human readable format in-place.

Solution: divide steps of finding diff between two derivations and printing it out. Now result of diff is tree with result of derivation comparison, that you can print than in stdout as was before, or use in your program.

Gabriella439 commented 1 year ago

I'd accept a change like this to expose the logic as an API. You can reopen if you want

s-and-witch commented 1 year ago

I'm sorry to trouble you. I will reopen it when PR will be ready. I created this PR due to non-intuitive defaults of GitHub UI.

Gabriella439 commented 1 year ago

No worries! 🙂