-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
pkgs/by-name: testVersion
-> versionCheckHook
where applicable
#327517
Conversation
This should help - Simplify expressions - Reduce (some) repition/workarounds - Improve automated testing by making these checks a requirement to build - Maintain consistency between which of these version check implementations are used across pkgs/by-name - Provide more real-world examples of this newly added hook - Avoid NixOS#312345 in many places
b1eb076
to
8011228
Compare
Two issues I see:
And to respond to the "pro" list:
Simplification shouldn't introduce incorrect designs
Unclear
Probably the only benefit, except r-ryantm and ofborg already build the tests anyway.
We should consistently use
Not really a "pro"
Those builders should be fixed instead |
This is an "issue" with the hook itself and should have been discussed in #320266. The changes here simply follow the docs recommendation of preferring
As already mentioned in the original PR, the installCheck phase is disabled for cross compiled builds. This is not an issue
Aside from what you mentioned above...what is incorrect here?
Many packages require workarounds in filtering their output to use
Many contributors look over this though, and it commonly results in these tests failing in PRs when they could have otherwise been caught earlier. This obviously isn't a knock against
Once again, feel free to open another issue to discuss this further. For now, the docs explicitly state
I 100% agree! Until then though, this does avoid the issue |
If we're talking about docs, they do say:
Build overhead is not as relevant but the independent env is relevant and the point I made above. |
The hook does run in a clean environment with a different working directory -- which was actually added for similar reasons here. Once again though, this feels more like you taking issue with the existence and efficacy of the hook itself rather than this PR specifically. I would highly encourage opening a separate issue to discuss this |
Of course I am discussing the hook, hence I object to a treewide mass rebuild PR that uses it if it's not a net benefit. |
I agree that if our consensus is not strong regarding the hook and the recommendation for it by the docs, perhaps these disagreements should block this PR. Unfortunately the PR that added the hook hasn't received wide attention. @eclairevoyant please open a new discussion in an new issue where you address specific sentences in the docs with which you don't agree, and explain why thoroughly. |
I partially agree with this argument, but not exactly with how it is phrased: We have a I do agree that in terms of potential nixpkgs/doc/stdenv/passthru.chapter.md Lines 86 to 88 in 716331f
Additionally, running a nixpkgs-review on this PR would be easier if only leaf packages would be touched. Perhaps we should limit this to less then 200 rebuilds? The hard part would be to filter out from the current PR the mass rebuild triggering packages... See also discussion that started here (which was the seed for the idea of this hook): https://discourse.nixos.org/t/improve-the-jdk-infrastructure-on-nixpkgs/45678/7 |
testVersion
-> checkVersionHook
where applicabletestVersion
-> versionCheckHook
where applicable
Looking for reviewers for #344321 i now discover this discussion. I believe the trade-off between the two is worth considering, but should be at the package maintainers discretion. |
Description of changes
Follow up on #320266
This should help
build
implementations are used across pkgs/by-name
CC @doronbehar
I believe all occurrences of
testVersion
have been either replaced or given a TODO comment, with the exception ofThe sarif packages have been taken care of in #327451, #327452, #327454, #327455, and #327456 earlier today.
hello
will retain it's use oftestVersion
to serve as an example (as I believe this was the intention, given it was already there)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/
)Add a 👍 reaction to pull requests you find important.