aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-24 21:02:51 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-24 21:14:06 +0000
commit2c7557481b4c9d5113a65cc7a75c8acc18031f4e (patch)
tree11670e25941c01ffe9a45162753813120348c326 /src/libstore/store-api.hh
parent2292814049256980c6e809ab364ebe0da3c9d76a (diff)
`queryDerivationOutputMap` no longer assumes all outputs have a mapping
This assumption is broken by CA derivations. Making a PR now to do the breaking daemon change as soon as possible (if it is already too late, we can bump protocol intead).
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index d1cb2035f..a83a2ff10 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -423,10 +423,16 @@ public:
/* Query the outputs of the derivation denoted by `path'. */
virtual StorePathSet queryDerivationOutputs(const StorePath & path);
- /* Query the mapping outputName=>outputPath for the given derivation */
- virtual OutputPathMap queryDerivationOutputMap(const StorePath & path)
+ /* Query the mapping outputName => outputPath for the given derivation. All
+ outputs are mentioned so ones mising the mapping are mapped to
+ `std::nullopt`. */
+ virtual std::map<std::string, std::optional<StorePath>> queryDerivationOutputMap(const StorePath & path)
{ unsupported("queryDerivationOutputMap"); }
+ /* Query the mapping outputName=>outputPath for the given derivation.
+ Assume every output has a mapping and throw an exception otherwise. */
+ OutputPathMap queryDerivationOutputMapAssumeTotal(const StorePath & path);
+
/* Query the full store path given the hash part of a valid store
path, or empty if the path doesn't exist. */
virtual std::optional<StorePath> queryPathFromHashPart(const std::string & hashPart) = 0;