Skip to content

[Reapply] Minor check-meta.nix optimisations and cleanups#471029

Merged
infinisil merged 7 commits into
NixOS:masterfrom
tweag:check-meta-cleanups-v2
Dec 15, 2025
Merged

[Reapply] Minor check-meta.nix optimisations and cleanups#471029
infinisil merged 7 commits into
NixOS:masterfrom
tweag:check-meta-cleanups-v2

Conversation

@infinisil

Copy link
Copy Markdown
Member

Reapplies #466947 with a fix and another minor change after the reversal in #470757 due to the Hydra error.

Things done

  • Tested what previously failed and more

Add a 👍 reaction to pull requests you find important.

- Makes the code more clean and obvious
- Allows remediations to depend on values computed during the check
  (useful for NixOS#338267)

Reapplying 42cfcdf
after reversal in 0b90ed8

Compared to the original commit, this includes the fix for the problem
that required the revert.
Probably that's a historical artifact

Reapplying 360f401
after reversal in 0b90ed8
Remove some clearly-unnecessary ones and add some direly-needed ones

Reapplying 43f81c8
after reversal in 0b90ed8
- Avoid some attribute set accesses
- Make a variable more local, avoiding a thunk
- Avoid always checking config.checkMeta for every attribute

Reapplying ab0c4c1
after reversal in 0b90ed8
- Boolean operator short-circuit optimisation
- Eta-reduction and make some allow/blocklist-dependend functions more cachable
- Inline functions that are only used once
- Make getEnv cached

Reapplying f7486d2
after reversal in 0b90ed8
- Remove the internal conditioning on the result of `valid`, we can know
  exactly when which value is produced
- Faster success path for checkMeta, also avoiding an environment
- Inline handlers

Reapplying 660cecd
after reversal in 0b90ed8
@infinisil infinisil marked this pull request as ready for review December 15, 2025 13:36
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: stdenv Standard environment labels Dec 15, 2025
@vcunat

vcunat commented Dec 15, 2025

Copy link
Copy Markdown
Member

Just to be sure, I rechecked

nix build -f nixos/release-small.nix nixpkgs.release-checks

@infinisil infinisil added this pull request to the merge queue Dec 15, 2025
Merged via the queue into NixOS:master with commit 9366497 Dec 15, 2025
29 of 32 checks passed
@infinisil infinisil deleted the check-meta-cleanups-v2 branch December 15, 2025 15:52
@github-project-automation github-project-automation Bot moved this to Done in Stdenv Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants