refactor(tvix): Remove some default values from virtual methods
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>
This commit is contained in:
parent
e09a6262d5
commit
a75c0278db
2 changed files with 18 additions and 6 deletions
4
third_party/nix/src/libstore/rpc-store.hh
vendored
4
third_party/nix/src/libstore/rpc-store.hh
vendored
|
@ -68,11 +68,11 @@ class RpcStore : public LocalFSStore, public virtual Store {
|
|||
RepairFlag repair = NoRepair) override;
|
||||
|
||||
virtual absl::Status buildPaths(const PathSet& paths,
|
||||
BuildMode buildMode = bmNormal) override;
|
||||
BuildMode buildMode) override;
|
||||
|
||||
virtual BuildResult buildDerivation(const Path& drvPath,
|
||||
const BasicDerivation& drv,
|
||||
BuildMode buildMode = bmNormal) override;
|
||||
BuildMode buildMode) override;
|
||||
|
||||
virtual void ensurePath(const Path& path) override;
|
||||
|
||||
|
|
20
third_party/nix/src/libstore/store-api.hh
vendored
20
third_party/nix/src/libstore/store-api.hh
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue