Equivalent of --max-jobs 0?
nomeata opened this issue · comments
I noticed that with lorri I am always a bit worried that I do something wrong, or my network goes down, and suddenly lorri will heat my my laptop to build rustc
or something like that, instead of fetching it from a cache.
So I am wondering: Is there a supported and reliable way to get lorri
into a state where it will never let nix build stuff locally: Either fetch everything needed for the shell from a cache, or fail the build.
Is this somehting that crossed your mind? How would I do that?
So I am wondering: Is there a supported and reliable way to get
lorri
into a state where it will never let nix build stuff locally: Either fetch everything needed for the shell from a cache, or fail the build.
This sounds like a good candidate for a specific feature-flag in lorri.
It would pass --builders ''
and --max-jobs 0
to the nix build, but we should kind of make sure the error messages that lorri gives are nice.
As far as implementation goes, I’d translate the flag to
Lines 1 to 19 in 0b3d330
(needs a new struct field for max-jobs
).
Maybe even add a provenance thingy to the nix options merge, so that if user sets conflicting flags there is a way to error out (or if there’s redundant flags there is a way to notify). Though I would say that is optional/orthogonal.