Tests for derivation "advanced attrs"#10874
Conversation
roberth
left a comment
There was a problem hiding this comment.
Can't comment on everything, but here's something.
Anyway, it's great that you're adding tests.
Ericson2314
left a comment
There was a problem hiding this comment.
This looks quite good to me now!
tomberek
left a comment
There was a problem hiding this comment.
Reviewed live. Only question is about the future of "dummy". Tests help create more confidence in upcoming refactors.
9b7ae2b to
510f4f5
Compare
|
This no longer depends on changing Setting the global settings in unit tests like this is very ugly, but the real problem is not changing the settings but having the code being unit tested depend on global variables at all. #5638 tracks fixing this. I intend not to let that issue fester; #10913 is some progress on it. |
510f4f5 to
ded4824
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-06-17-nix-team-meeting-minutes-153/47186/1 |
Will be used in a second test after `lang.sh`.
d98b34f to
84654d8
Compare
96de33a to
8b109b5
Compare
8b109b5 to
cb51457
Compare
This tests the Nix language side of things. We are purposely skipping most of `common.sh` because it is overkill for this test: we don't want to have an "overfit" test environment. Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
This tests the parser and JSON format using the DRV files from the tests added in the previous commit. Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
cb51457 to
7fb1420
Compare
Motivation
Closely linked to #10760, which aims to change the internal data-structures surrounding
Derivation.The goal of this PR is to ensure that the other PR does not change any current behavior.
This is very much work-in-progress, so happy about every piece of feedback!Context
See #10760
@Ericson2314 Broke up the
builtins.derivationStrictimplementation in order to expose creating a (C++)Derivationfor the sake of these unit tests.Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.