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: 2283fbc0d743
Choose a base ref
...
head repository: NixOS/nix
compare: f6c1a62867e3
Choose a head ref
  • 10 commits
  • 13 files changed
  • 2 contributors

Commits on Dec 11, 2020

  1. Use the hash modulo in the derivation outputs

    Rather than storing the derivation outputs as `drvPath!outputName` internally,
    store them as `drvHashModulo!outputName` (or `outputHash!outputName` for
    fixed-output derivations).
    
    This makes the storage slightly more opaque, but enables an earlier
    cutoff in cases where a fixed-output dependency changes (but keeps the
    same output hash) − same as what we already do for input-addressed
    derivations.
    thufschmitt committed Dec 11, 2020
    Copy the full SHA
    bab1cda View commit details
    Browse the repository at this point in the history
  2. Restrict the operations on drv outputs in recursive Nix

    There's currently no way to properly filter them, so disallow them
    altogether instead.
    thufschmitt committed Dec 11, 2020
    Copy the full SHA
    e9b39f6 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2020

  1. Better detect when buildPaths would be a no-op

    `buildPaths` can be called even for stores where it's not defined in case it's
    bound to be a no-op.
    The “no-op detection” mechanism was only detecting the case wher `buildPaths`
    was called on a set of (non-drv) paths that were already present on the store.
    
    This commit extends this mechanism to also detect the case where `buildPaths`
    is called on a set of derivation outputs which are already built on the store.
    
    This only works with the ca-derivations flag. It could be possible to
    extend this to also work without it, but it would add quite a bit of
    complexity, and it's not used without it anyways.
    thufschmitt committed Dec 16, 2020
    Copy the full SHA
    6e89927 View commit details
    Browse the repository at this point in the history
  2. Fix BinaryCacheStore::registerDrvOutput

    Was crashing because coercing a json document into a string is only
    valid if the json is a string, otherwise we need to call `.dump()`
    thufschmitt committed Dec 16, 2020
    Copy the full SHA
    962b82e View commit details
    Browse the repository at this point in the history
  3. Merge pull request #4371 from NixOS/ca/fix-remote-store-registerDrvOu…

    …tput
    
    Fix BinaryCacheStore::registerDrvOutput
    edolstra committed Dec 16, 2020
    Copy the full SHA
    c64208d View commit details
    Browse the repository at this point in the history
  4. Merge pull request #4348 from NixOS/ca/use-hashmodulo

    Use the hash modulo in the derivation outputs
    edolstra committed Dec 16, 2020
    1
    Copy the full SHA
    3765174 View commit details
    Browse the repository at this point in the history
  5. Don't ignore an absent drv file in queryPartialDrvOutputMap

    This ignore was here because `queryPartialDrvOutputMap` was used both
    1. as a cache to avoid having to re-read the derivation (when gc-ing for
    example), and
    2. as the source of truth for ca realisations
    
    The use-case 2. required it to be able to work even when the derivation
    wasn't there anymore (see #4138).
    However, this use-case is now handled by `queryRealisation`, meaning
    that we can safely error out if the derivation isn't there anymore
    thufschmitt committed Dec 16, 2020
    Copy the full SHA
    cac8d5b View commit details
    Browse the repository at this point in the history
  6. Merge pull request #4373 from NixOS/ca/fix-queryPartialDrvOutputMap-w…

    …hen-no-derivation
    
    Don't ignore an absent drv file in queryPartialDrvOutputMap
    edolstra committed Dec 16, 2020
    Copy the full SHA
    fdc8e7c View commit details
    Browse the repository at this point in the history
  7. Merge pull request #4370 from NixOS/ca/more-precise-build-noop

    Better detect when `buildPaths` would be a no-op
    edolstra committed Dec 16, 2020
    Copy the full SHA
    ae3c3e3 View commit details
    Browse the repository at this point in the history
  8. Add a new Cmd type working on RealisedPaths

    Where a `RealisedPath` is a store path with its history, meaning either
    an opaque path for stuff that has been directly added to the store, or a
    `Realisation` for stuff that has been built by a derivation
    
    This is a low-level refactoring that doesn't bring anything by itself
    (except a few dozen extra lines of code :/ ), but raising the
    abstraction level a bit is important on a number of levels:
    
    - Commands like `nix build` have to query for the realisations after the
      build is finished which is fragile (see
      27905f1 for example). Having them
      oprate directly at the realisation level would avoid that
    - Others like `nix copy` currently operate directly on (built) store
      paths, but need a bit more information as they will need to register
      the realisations on the remote side
    thufschmitt committed Dec 16, 2020
    Copy the full SHA
    f6c1a62 View commit details
    Browse the repository at this point in the history