-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
trivial-builders: replace writeReferencesToFile with writeClosure #178717
Changes from all commits
e9fd438
8a8d07b
97a7ce7
e28ad1a
5c1a3b6
67ec1a7
112c3d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I've been waiting for the darwin check and couldn't resist posting a) Nit: might as well use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That RFC style guide is a long one. Since it doesn't affect evaluation,we could reformat in subsequent PRs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
BTW, #273183 provides non-Linux developers with utilities to run and inspect the tests, while keeping the CI green. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ lib | ||
, runCommandLocal | ||
# Test targets | ||
, writeClosure | ||
, samples | ||
}: | ||
runCommandLocal "test-trivial-builders-writeClosure-union" { | ||
__structuredAttrs = true; | ||
closures = lib.mapAttrs (n: v: writeClosure [ v ]) samples; | ||
collectiveClosure = writeClosure (lib.attrValues samples); | ||
inherit samples; | ||
meta.maintainers = with lib.maintainers; [ | ||
ShamrockLee | ||
]; | ||
} '' | ||
set -eu -o pipefail | ||
echo >&2 Testing mixed closures... | ||
echo >&2 Checking all samples "(''${samples[*]})" "$collectiveClosure" | ||
diff -U3 \ | ||
<(sort <"$collectiveClosure") \ | ||
<(cat "''${closures[@]}" | sort | uniq) | ||
touch "$out" | ||
'' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: you can now open a PR with the
lib.sort
feature you proposed earlier. I still don't understand the implications this would haveThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#300722 it is! Please take a look.