Parallel evaluation of flake outputs #382
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#382
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
I was looking at
nix-fast-build
since I felt thatnix flake check
was taking too long (~1min in my flake-based nixos configuration) and got stuck not being able to run the checks thatnix flake check
does by default (e.g. checking overlays, nixosConfigurations, etc.) as these are not available tonix-eval-jobs
, the underlying toolnix-fast-build
uses to parallelize nix builds.Describe the solution you'd like
I would like parallel execution of the check in
nix flake check
to be done insidenix
(lix
) itself; that way the default checks could also be done in parallel. This could also be used to build a CLI that achieves the same purpose asnix-eval-jobs
, but is able to share more internal state (and thus be even faster).Describe alternatives you've considered
nix build
(and thus be available fornix-eval-jobs
).Additional context
When I say the default checks are not available I mean that if you define a
outputs = {...}: {checks.x86_64-linux.lint = ...;}
you can then callnix build .#checks.x86_64-linux.lint
and evaluate the check. You cannot do this for the checks that work by default onpackages
,devShells
,overlays
, etc.we would really like to make nix-eval-jobs kind of thing part of lix. see also: #25
This is slightly different from
nix-eval-jobs
:Using the example command from #25 (comment) on the public part of my NixOS configuration you only get four derivations (the ones explicitly defined in the
.#checks
), not the actual ~12 checks that run withnix flake check
.actual run of
nix flake check
in the repo (~20 checks)Another problem with
nix-eval-jobs
, is that you need to run four instances ofnix build
, which all re-evaluate theinputs
. I don't think this is a big issue, but it certainly could be made more efficient by first evaluating the inputs and then splitting off the computation.PS: I assume you all know this better than I do, but I prefer having it written down so we can all be on the same page c: