Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output all differences between the compared derivations #7

Merged
merged 1 commit into from Apr 11, 2018

Conversation

Ekleog
Copy link
Contributor

@Ekleog Ekleog commented Apr 11, 2018

Before this change, if the set of input names to a derivation changed,
then the set of matching-names inputs was not compared.

This fixes the issue, allowing to use nix-diff as a tool for system
administration: there, you have to know all the differences between the
two system derivations, not only until an input set has a mismatching
name (eg. a linux-kernel upgrade should not hide an nginx upgrade).

Fixes #5.

Before this change, if the set of input names to a derivation changed,
then the set of matching-names inputs was not compared.

This fixes the issue, allowing to use `nix-diff` as a tool for system
administration: there, you have to know all the differences between the
two system derivations, not only until an input set has a mismatching
name (eg. a linux-kernel upgrade should not hide an nginx upgrade).

Fixes Gabriella439#5.
@Ekleog
Copy link
Contributor Author

Ekleog commented Apr 11, 2018

For ease of reviewing, the changes here are:

  • Change the if leftNames /= rightNames then A else B in when (leftNames /= rightNames) A >>= B to not shortcut (this implies the indentation change that makes the diff hard to read)
  • Remove 4 trailing spaces I noticed when doing this diff

@Gabriella439
Copy link
Owner

Awesome! Thanks for doing this :)

@Gabriella439 Gabriella439 merged commit ece65b7 into Gabriella439:master Apr 11, 2018
@Ekleog Ekleog deleted the fix-5 branch April 11, 2018 23:47
@Ekleog
Copy link
Contributor Author

Ekleog commented Apr 11, 2018

And thanks for accepting it! :)

@Gabriella439
Copy link
Owner

You're welcome! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing differences when input names do not match
2 participants