aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/misc.cc
AgeCommit message (Collapse)Author
2023-01-23Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2023-01-15Try to fix build failureJohn Ericson
Failure: https://hydra.nixos.org/build/205357257/nixlog/1 The problem seems to be trying to `std::visit` a derived class of `std::variant`. Per https://stackoverflow.com/questions/63616709/incomplete-type-stdvariant-used-in-nested-name-specifier certain C++ standard library implementations allow this, but others do not. The solution is simply to call the `raw` method, which upcasts the reference back to the `std::variant`.
2023-01-14Make `ValidPathInfo` have plain `StorePathSet` references like beforeJohn Ericson
This change can wait for another PR.
2023-01-14Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2023-01-11Make it hard to construct an empty `OutputsSpec::Names`John Ericson
This should be a non-empty set, and so we don't want people doing this by accident. We remove the zero-0 constructor with a little inheritance trickery.
2023-01-11Split `OutputsSpec` and `ExtendedOutputsSpec`, use the former moreJohn Ericson
`DerivedPath::Built` and `DerivationGoal` were previously using a regular set with the convention that the empty set means all outputs. But it is easy to forget about this rule when processing those sets. Using `OutputSpec` forces us to get it right.
2023-01-06Do big rename to clean up codeJohn Ericson
- `PathReferences` -> `References` - `PathReferences<StorePath>` -> `StoreReference` - `references` -> `others` - `hasSelfReference` -> `self` And get rid of silly subclassing
2023-01-06Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2022-05-04Get rid of most `.at` calls (#6393)Alain Zscheile
Use one of `get` or `getOr` instead which will either return a null-pointer (with a nicer error message) or a default value when the key is missing.
2022-04-19Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2022-03-31Support fixed-output derivations depending on impure derivationsEelco Dolstra
2022-03-25Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2022-03-17Clean up `DerivationOutput`, and headersJohn Ericson
1. `DerivationOutput` now as the `std::variant` as a base class. And the variants are given hierarchical names under `DerivationOutput`. In 8e0d0689be797f9e42f9b43b06f50c1af7f20b4a @matthewbauer and I didn't know a better idiom, and so we made it a field. But this sort of "newtype" is anoying for literals downstream. Since then we leaned the base class, inherit the constructors trick, e.g. used in `DerivedPath`. Switching to use that makes this more ergonomic, and consistent. 2. `store-api.hh` and `derivations.hh` are now independent. In bcde5456cc3295061a0726881c3e441444dd6680 I swapped the dependency, but I now know it is better to just keep on using incomplete types as much as possible for faster compilation and good separation of concerns.
2022-03-10Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2021-12-13queryMissing(): Use a bigger thread poolEelco Dolstra
This is a temporary hack until we make queryMissing() async. Closes #5324.
2021-10-14CleanupEelco Dolstra
2021-10-01Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2021-09-30Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2021-09-30`std::visit` by referenceJohn Ericson
I had started the trend of doing `std::visit` by value (because a type error once mislead me into thinking that was the only form that existed). While the optomizer in principle should be able to deal with extra coppying or extra indirection once the lambdas inlined, sticking with by reference is the conventional default. I hope this might even improve performance.
2021-06-23Merge pull request #4906 from NixOS/collect-garbage-caEelco Dolstra
Make `computeFSClosure` ca-aware
2021-06-23Pass more values by referenceThéophane Hufschmitt
Rather than copying them around everywhere Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-06-12Don’t check the `deriver` field on computeFSClosureregnat
That doesn’t really make sense with CA derivations (and wasn’t even really correct before because of FO derivations, though that probably didn’t matter much in practice)
2021-06-11Make `computeFSClosure` ca-awareregnat
Fix #4820 by preventing nix-collect garbage from crashing if `keep-outputs` or `keep-derivations` is true
2021-05-26Aso track the output path of the realisation dependenciesregnat
2021-05-26Properly track the drvoutput references when buildingregnat
2021-05-19Extract a generic `computeClosure` functionregnat
Move the `closure` logic of `computeFSClosure` to its own (templated) function. This doesn’t bring much by itself (except for the ability to properly test the “closure” functionality independently from the rest), but it allows reusing it (in particular for the realisations which will require a very similar closure computation)
2021-04-05Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2021-04-05Merge commit '9dfb97c987d8b9d6a3d15f016e40f22f91deb764' into path-infoJohn Ericson
2021-04-05Merge branch 'master' into path-infoJohn Ericson
2021-04-05Rename BuildableJohn Ericson
2021-04-05"newtype" BuildableReqJohn Ericson
This makes for better types errors and allows us to give it methods.
2021-04-05Use `BuildableReq` for `buildPaths` and `ensurePath`John Ericson
This avoids an ambiguity where the `StorePathWithOutputs { drvPath, {} }` could mean "build `brvPath`" or "substitute `drvPath`" depending on context. It also brings the internals closer in line to the new CLI, by generalizing the `Buildable` type is used there and makes that distinction already. In doing so, relegate `StorePathWithOutputs` to being a type just for backwards compatibility (CLI and RPC).
2021-03-05Avoid some StorePath -> Path -> StorePath roundtripsJohn Ericson
There were done when StorePath was defined in Rust and there were some FFI issues. This is no longer an issue.
2020-09-23Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2020-09-21Move Callback into its own headerEelco Dolstra
This gets rid of the inclusion of <future> in util.hh, cutting compilation time by ~20s (CPU time). Issue #4045.
2020-08-20Rename drv output querying functions, like masterJohn Ericson
- `queryDerivationOutputMapAssumeTotal` -> `queryPartialDerivationOutputMap` - `queryDerivationOutputMapAssumeTotal` -> `queryDerivationOutputMap
2020-08-07Squashed get CA derivations buildingJohn Ericson
2020-08-05Make names more consistentJohn Ericson
2020-08-05Merge pull request #3864 from obsidiansystems/more-topo-sortEelco Dolstra
Abstract out topo sorting logic
2020-08-01Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2020-07-30Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-07-30unsigned long long -> uint64_tEelco Dolstra
2020-07-27Abstract out topo sorting logicJohn Ericson
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-06-25WIP: store separate `hasValidPath` boolJohn Ericson
2020-06-22Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-06-19Replace error message in getDerivationCAMatthew Bauer
2020-06-19Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-06-17Add StorePathCAMap for querySubstitutablePathInfosMatthew Bauer
I’m not 100% sure this is wanted since it kind of makes everything have to know about ca even if they don’t really want to. But it also make things easier in dealing with looking up ca.
2020-06-17Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer