Add --cold flag to estimate a from-scratch build (ignore local cache) #1
Reference in New Issue
Block a user
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?
Problem
When the target is already fully built/cached,
nix build --dry-runreports 0 to-build, soto_build_set()returns an empty set and the CLI prints "Nothing to build — the whole closure substitutes from cache." There is no way to ask the more common sizing question: "how long would this take to build from scratch?"Observed on emmett:
.#nixosConfigurations.emmett.config.system.build.toplevelon x86 (fully built locally) gives 0 to-build, even though the real closure is 18,727 derivations.Fix
The escape hatch already exists in the code:
build_dag()treatsto_build=Noneas "use the whole closure" (cold-cache over-estimate). Nothing triggers it from the CLI.--cold(alias--full) tocli.pythat forcesto_build=None, bypassingto_build_set().Small, self-contained. Directly fixes the "nothing to build" dead-end seen in the emmett trial.