Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 64b2c826e76d^
Choose a base ref
...
head repository: NixOS/nix
compare: 258da08de7f0
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Dec 9, 2020

  1. Register the outputs of non-resolved derivations

    When building a (non fully-input-addressed) derivation, we first resolve it to
    a `BasicDerivation` that depends directly on the output paths of its
    dependencies (rather than on the derivation outputs) − this is what enables
    early cutoff.
    
    Currently we register the realisation of the resolved derivation, so that
    subsequent calls to `nix-build` can directly reuse this without rebuilding the
    derivation.  However, we don't register the unresolved derivation, meaning that
    we have to re-do the resolution step each time. This in turn means that we must
    either keep all the build inputs or keep the knowledge of their output path
    (without the content of the path itself). The former is very costly in
    disk-space (it amounts to making every build-input a runtime dependency), and
    the latter comes with a big set of challenges in presence of non-determinism
    that makes this a too heavy-handed solution for the time being (though we might
    switch to it eventually if we can find a way to solve its issues as it's a
    rather tempting design).
    
    To avoid these issues, we choose a third way which is to also register the
    realisation of the unresolved derivation − so we can completely sidestep the
    resolving phase, which makes these behave as classical input-addressed
    derivations.
    thufschmitt committed Dec 9, 2020
    Copy the full SHA
    64b2c82 View commit details
    Browse the repository at this point in the history
  2. Don't crash nix-build when not all outputs are realised

    Change the `nix-build` logic for linking/printing the output paths to allow for
    some outputs to be missing. This might happen when the toplevel
    derivation didn't have to be built, either because all the required
    outputs were already there, or because they have all been substituted.
    thufschmitt committed Dec 9, 2020
    Copy the full SHA
    c1140b2 View commit details
    Browse the repository at this point in the history
  3. Test the garbage collection of CA derivations

    Simple test to ensure that `nix-build && nix-collect-garbage &&
    nix-build -j0` works as it should
    thufschmitt committed Dec 9, 2020
    Copy the full SHA
    258da08 View commit details
    Browse the repository at this point in the history