aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
AgeCommit message (Collapse)Author
2020-07-16Merge branch 'master' of github.com:NixOS/nix into ↵Carlo Nucera
optional-derivation-output-storepath
2020-07-16Merge remote-tracking branch 'origin/flakes'Eelco Dolstra
2020-07-15Revert "LocalStore::addToStore(srcPath): Handle the flat case"Eelco Dolstra
This reverts commit a2c27022e9afc394e08d34d349587c8903fc1a97. See addToStoreSlow(), we don't need to handle this case efficiently anymore. In fact, we can almost remove the method/hashAlgo arguments since the non-recursive and/or non-SHA256 are almost not used anymore.
2020-07-14Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-13Remove 'accessor' from addToStore()Eelco Dolstra
This is only used by hydra-queue-runner and it's better to implement it there.
2020-07-11Merge remote-tracking branch 'upstream/master' into ↵John Ericson
optional-derivation-output-storepath
2020-07-09LocalStore::addToStore(srcPath): Handle the flat caseEelco Dolstra
This helps nix-prefetch-url when using a local store.
2020-07-08Only store hash of fixed derivation outputMatthew Bauer
we don’t need a full storepath for a fixedoutput derivation. So just putting the ingestion method + the hash is sufficient.
2020-07-08CleanupEelco Dolstra
2020-07-08Make LocalStore::addToStore(srcPath) run in constant memoryEelco Dolstra
This reduces memory consumption of nix-instantiate \ -E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \ --option nar-buffer-size 10000 (where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still ensuring that we don't do any write I/O for small source paths (up to 'nar-buffer-size' bytes). The downside is that large paths are now always written to a temporary location in the store, even if they produce an already valid store path. Thus, adding large paths might be slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always restore the old behaviour by setting 'nar-buffer-size' to a very high value.
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-24Add a way to get all the outputs of a derivation with their labelregnat
Generalize `queryDerivationOutputNames` and `queryDerivationOutputs` by adding a `queryDerivationOutputMap` that returns the map `outputName=>outputPath` (not that this is not equivalent to merging the results of `queryDerivationOutputs` and `queryDerivationOutputNames` as sets don't preserve the order, so we would end up with an incorrect mapping). squash! Add a way to get all the outputs of a derivation with their label Rename StorePathMap to OutputPathMap
2020-06-19More designated initializersJohn Ericson
2020-06-19Merge remote-tracking branch 'me/no-stringly-typed-derivation-output' into ↵John Ericson
validPathInfo-ca-proper-datatype
2020-06-18Merge branch 'validPathInfo-temp' into validPathInfo-ca-proper-datatypeJohn Ericson
2020-06-18Merge branch 'no-hash-type-unknown' into validPathInfo-tempJohn Ericson
2020-06-18Revert the `enum struct` changeJohn Ericson
Not a regular git revert as there have been many merges and things.
2020-06-18Merge branch 'enum-class' into no-hash-type-unknownJohn Ericson
2020-06-18Merge remote-tracking branch 'upstream/master' into enum-classJohn Ericson
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-17Merge remote-tracking branch 'upstream/master' into ↵John Ericson
no-stringly-typed-derivation-output
2020-06-16Remove StorePath::clone() and related functionsEelco Dolstra
2020-06-16StorePath: Rewrite in C++Eelco Dolstra
On nix-env -qa -f '<nixpkgs>', this reduces maximum RSS by 20970 KiB and runtime by 0.8%. This is mostly because we're not parsing the hash part as a hash anymore (just validating that it consists of base-32 characters). Also, replace storePathToHash() by StorePath::hashPart().
2020-06-15Remove trailing whitespaceEelco Dolstra
2020-06-15Merge branch 'errors-phase-2' of https://github.com/bburdette/nixEelco Dolstra
2020-06-12Add Store::readDerivation() convenience functionEelco Dolstra
2020-06-12Remove Store::queryDerivationOutputNames()Eelco Dolstra
This function was used in only one place, where it could easily be replaced by readDerivation() since it's not performance-critical. (This function appears to have been modelled after queryDerivationOutputs(), which exists only to make the garbage collector faster.)
2020-06-11Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-06-04Fix condition error and make test suite passCarlo Nucera
2020-06-04Flip booleanJohn Ericson
Thanks Matt!
2020-06-04Use some `std::optional::has_value` for clarityJohn Ericson
2020-06-03No C++ designated initializers yet with Clang 7John Ericson
2020-06-03Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-03libutils/hash: remove default encodingzimbatm
This will make it easier to reason about the hash encoding and switch to SRI everywhere where possible.
2020-06-03Merge remote-tracking branch 'obsidian/no-hash-type-unknown' into ↵John Ericson
validPathInfo-ca-proper-datatype
2020-06-02Apply suggestions from code reviewJohn Ericson
Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
2020-06-02Remove `HashType::Unknown`John Ericson
Instead, `Hash` uses `std::optional<HashType>`. In the future, we may also make `Hash` itself require a known hash type, encoraging people to use `std::optional<Hash>` instead.
2020-06-02Change parseCa(Opt) to parseContentAddress(Opt)Carlo Nucera
2020-06-02elide the 'ErrorInfo' in logError and logWarning callsBen Burdette
2020-06-02WIPJohn Ericson
2020-06-01Merge branch 'no-stringly-typed-derivation-output' of ↵Carlo Nucera
github.com:Ericson2314/nix into validPathInfo-ca-proper-datatype
2020-05-29Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-05-28Merge branch 'master' of github.com:NixOS/nix into enum-classCarlo Nucera
2020-05-28Merge remote-tracking branch 'me/more-rust-ffi' into ↵John Ericson
no-stringly-typed-derivation-output
2020-05-27Rename some variables named “recursive” to “method”Matthew Bauer
This is much less confusing since recursive is no longer a boolean.
2020-05-13formatting and a few minor changesBen Burdette
2020-05-13consistent capitalizationBen Burdette
2020-05-13change status messages to info levelBen Burdette
2020-05-12remove unused extra json fieldsBen Burdette