diff options
author | Vincent Ambo <mail@tazj.in> | 2020-08-20T01·52+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-08-20T11·48+0000 |
commit | a75c0278db652c7265f205f1a529632e6b050157 (patch) | |
tree | 18b8a5a3edbbc9cec4e1e8068097f09ffcd6e43b /third_party/nix/src/libstore/store-api.hh | |
parent | e09a6262d55ebffbd6e2973e7fe8ced6f1a45d83 (diff) |
refactor(tvix): Remove some default values from virtual methods r/1687
This is not actually legal code, but it kind of ... works. There are more of these around, these were just the ones Griffin stumbled upon while working on the build logs. Change-Id: Iff9821d8fe145dd426648a8ff4510a73f67c9b7d Reviewed-on: https://cl.tvl.fyi/c/depot/+/1795 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/libstore/store-api.hh')
-rw-r--r-- | third_party/nix/src/libstore/store-api.hh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh index 1d81b228f292..bb2f1a950bfd 100644 --- a/third_party/nix/src/libstore/store-api.hh +++ b/third_party/nix/src/libstore/store-api.hh @@ -348,8 +348,12 @@ class Store : public std::enable_shared_from_this<Store>, public Config { public: /* Query which of the given paths is valid. Optionally, try to substitute missing paths. */ - virtual PathSet queryValidPaths( - const PathSet& paths, SubstituteFlag maybeSubstitute = NoSubstitute); + virtual PathSet queryValidPaths(const PathSet& paths, + SubstituteFlag maybeSubstitute); + + PathSet queryValidPaths(const PathSet& paths) { + return queryValidPaths(paths, NoSubstitute); + } /* Query the set of all valid paths. Note that for some store backends, the name part of store paths may be omitted @@ -452,14 +456,22 @@ class Store : public std::enable_shared_from_this<Store>, public Config { recursively building any sub-derivations. For inputs that are not derivations, substitute them. */ [[nodiscard]] virtual absl::Status buildPaths(const PathSet& paths, - BuildMode buildMode = bmNormal); + BuildMode buildMode); + + [[nodiscard]] absl::Status buildPaths(const PathSet& paths) { + return buildPaths(paths, bmNormal); + } /* Build a single non-materialized derivation (i.e. not from an on-disk .drv file). Note that ‘drvPath’ is only used for informational purposes. */ virtual BuildResult buildDerivation(const Path& drvPath, const BasicDerivation& drv, - BuildMode buildMode = bmNormal) = 0; + BuildMode buildMode) = 0; + + BuildResult buildDerivation(const Path& drvPath, const BasicDerivation& drv) { + return buildDerivation(drvPath, drv, bmNormal); + } /* Ensure that a path is valid. If it is not currently valid, it may be made valid by running a substitute (if defined for the |