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

Refactoring test/default.nix #434

Merged

Conversation

cdepillabout
Copy link
Contributor

While working on #427, I was trying to figure out how the tests work. I ended up refactoring a bunch of the code in test/default.nix.

I pulled some things out into separate functions, as well as adding documentation. I didn't change any functionality.

cc @angerman @hamishmack

Comment on lines -17 to -21
} // pkgs.lib.optionalAttrs (ifdLevel > 1) (
builtins.mapAttrs (_: y: withIfdInputs y) ((if ifdLevel < 3
then builtins.mapAttrs (_: d: pkgs.recurseIntoAttrs (pkgs.lib.filterAttrs (n: _: n == "ifdInputs") d))
else x: x) {
cabal-simple = haskell-nix.callPackage ./cabal-simple { inherit util; };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from some simple formatting changes, this PR basically just pulls out each part of this code block into separate functions, and adds documentation describing what each does.

@hamishmack hamishmack merged commit ce65bf2 into input-output-hk:master Feb 5, 2020
@cdepillabout cdepillabout deleted the refactor-test-default.nix branch February 5, 2020 01:30
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.

None yet

2 participants