Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store the realisations of unresolved derivations #4340

Merged
merged 7 commits into from
Feb 19, 2021

Commits on Feb 16, 2021

  1. 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 Feb 16, 2021
    Configuration menu
    Copy the full SHA
    7c6c588 View commit details
    Browse the repository at this point in the history
  2. 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 Feb 16, 2021
    Configuration menu
    Copy the full SHA
    d3af4f3 View commit details
    Browse the repository at this point in the history
  3. Register the realisations for unresolved drvs

    Once a build is done, get back to the original derivation, and register
    all the newly built outputs for this derivation.
    
    This allows Nix to work properly with derivations that don't have all
    their build inputs available − thus allowing garbage collection and
    (once it's implemented) binary substitution
    thufschmitt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    e5c927e View commit details
    Browse the repository at this point in the history
  4. Syntactic fixes

    Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
    2 people authored and thufschmitt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    dcab172 View commit details
    Browse the repository at this point in the history
  5. Don't expose the "bang" drvoutput syntax

    It's not fixed nor useful atm, so better keep it hidden
    
    Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
    2 people authored and thufschmitt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    12c2674 View commit details
    Browse the repository at this point in the history
  6. Store the output hashes in the initialOutputs of the drv goal

    That way we
    1. Don't have to recompute them several times
    2. Can compute them in a place where we know the type of the parent
      derivation, meaning that we don't need the casting dance we had before
    thufschmitt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    413ecb7 View commit details
    Browse the repository at this point in the history
  7. Remove the drv resolution caching mechanism

    It isn't needed anymore now that don't need to eagerly resolve
    everything like we used to do. So we can safely get rid of it
    thufschmitt committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    da404b5 View commit details
    Browse the repository at this point in the history