-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Eval fixes from release-attrpaths-superset.nix optimization (part 2) #271123
Conversation
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.
But please apply the two-line suggestion below.
e2f5849
to
310cda5
Compare
in if missingArgs == {} then makeOverridable f allArgs else abort error; | ||
in if missingArgs == {} | ||
then makeOverridable f allArgs | ||
else throw "lib.customisation.callPackageWith: ${error}"; |
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.
What was the motivation for this specific change? It makes it so nix-env -qa
no longer fails and just silently drops the attrpath when querying pacakges that have missing arguments (and therefore ofborg and other CI relies on the previous behavior to catch missing argument errors during outpath calculation)
This still smells like a bug in nix-env
regardless to me, so this bit in Nixpkgs probably doesn't need to be changed back, but I'm still trying to trace down in that code where/why this throw would be ignored rather than propagated as an eval error
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.
Nope, this is intended behavior in Nix:
Throw an error message s. This usually aborts Nix expression
evaluation, but innix-env -qa
and other commands that try to
evaluate a set of derivations to get information about those
derivations, a derivation that throws an error is silently skipped
(which is not the case forabort
).
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-throw
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.
Oh damn yeah. Probably the entire reason this is in nix-env at all is because we historically haven't had anything like this PR, which would've prevented packages from not being evaluatable.
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.
Revert and eval fixes in #278777
This reverts f8ea911, see also NixOS#271123 (comment)
Was broken in 9fddd79 but not caught due to NixOS#271123 (comment)
This was not caught when the package was introduced because of NixOS#271123 (comment)
Was broken by feb114f And not caught due to NixOS#271123 (comment)
Was broken since 7dd3469 but not caught due to NixOS#271123 (comment)
Was broken since introduced, but not caught due to NixOS#271123 (comment)
This reverts f8ea911, see also NixOS#271123 (comment)
… false Was broken since initialised in 9b2d4d2 but not noticed due to NixOS#271123 (comment)
… false Was broken since initialised in 9b2d4d2 but not noticed due to NixOS#271123 (comment)
Was broken by feb114f And not caught due to NixOS#271123 (comment)
Was broken since 7dd3469 but not caught due to NixOS#271123 (comment)
Was broken since introduced, but not caught due to NixOS#271123 (comment)
This reverts f8ea911, see also NixOS#271123 (comment)
Was broken in 9fddd79 but not caught due to NixOS#271123 (comment)
This was not caught when the package was introduced because of NixOS#271123 (comment)
Was broken by feb114f And not caught due to NixOS#271123 (comment)
Was broken since 7dd3469 but not caught due to NixOS#271123 (comment)
Was broken since introduced, but not caught due to NixOS#271123 (comment)
This reverts f8ea911, see also NixOS#271123 (comment)
This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962/nixlog/1 It appears that this attribute is only evaluated by Hydra, _not_ by ofborg. So this wouldn't have been detected by CI anyways in the PR that introduced the problem: #276800. However, due to #271123 (comment), the channel only broke once that was fixed with #278777 Whether the fix is good, I don't know, but the failing-on-darwin attribute doesn't exist anymore with this commit, making the tarball build succeed again: nix-build pkgs/top-level/release.nix -A tarball
This reverts 5629aec, see also NixOS/nixpkgs#271123 (comment)
Was broken in 9fddd79 but not caught due to NixOS#271123 (comment)
This was not caught when the package was introduced because of NixOS#271123 (comment)
Was broken by feb114f And not caught due to NixOS#271123 (comment)
Was broken since 7dd3469 but not caught due to NixOS#271123 (comment)
Was broken since introduced, but not caught due to NixOS#271123 (comment)
This reverts f8ea911, see also NixOS#271123 (comment)
Was broken in 9fddd79 but not caught due to NixOS#271123 (comment)
This was not caught when the package was introduced because of NixOS#271123 (comment)
Was broken by feb114f And not caught due to NixOS#271123 (comment)
Was broken since 7dd3469 but not caught due to NixOS#271123 (comment)
Was broken since introduced, but not caught due to NixOS#271123 (comment)
This reverts f8ea911, see also NixOS#271123 (comment)
Was broken since introduced, but not caught due to NixOS#271123 (comment) (cherry picked from commit 6946071)
This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962/nixlog/1 It appears that this attribute is only evaluated by Hydra, _not_ by ofborg. So this wouldn't have been detected by CI anyways in the PR that introduced the problem: NixOS#276800. However, due to NixOS#271123 (comment), the channel only broke once that was fixed with NixOS#278777 Whether the fix is good, I don't know, but the failing-on-darwin attribute doesn't exist anymore with this commit, making the tarball build succeed again: nix-build pkgs/top-level/release.nix -A tarball
This reverts 4c75ef3, see also NixOS/nixpkgs#271123 (comment)
This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962/nixlog/1 It appears that this attribute is only evaluated by Hydra, _not_ by ofborg. So this wouldn't have been detected by CI anyways in the PR that introduced the problem: NixOS#276800. However, due to NixOS#271123 (comment), the channel only broke once that was fixed with NixOS#278777 Whether the fix is good, I don't know, but the failing-on-darwin attribute doesn't exist anymore with this commit, making the tarball build succeed again: nix-build pkgs/top-level/release.nix -A tarball
This very weirdly broke the channel evaluation: https://hydra.nixos.org/build/245871962/nixlog/1 It appears that this attribute is only evaluated by Hydra, _not_ by ofborg. So this wouldn't have been detected by CI anyways in the PR that introduced the problem: NixOS#276800. However, due to NixOS#271123 (comment), the channel only broke once that was fixed with NixOS#278777 Whether the fix is good, I don't know, but the failing-on-darwin attribute doesn't exist anymore with this commit, making the tarball build succeed again: nix-build pkgs/top-level/release.nix -A tarball
Description of changes
context #269356
Purpose is to reduce the size of the PR.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Priorities
Add a 👍 reaction to pull requests you find important.