Separate path.hh from content-address.hh

It is good to separate concerns; `StorePath` (in general) has nothing to
do with `ContentAddress` anyways.

This reduces the diff from #3746.
This commit is contained in:
John Ericson 2023-01-30 10:12:44 -05:00
parent a31d7d4e5e
commit 02e745ba5b
3 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include "content-address.hh"
#include <string_view>
#include "types.hh"
namespace nix {
@ -66,8 +67,6 @@ public:
typedef std::set<StorePath> StorePathSet;
typedef std::vector<StorePath> StorePaths;
typedef std::map<StorePath, std::optional<ContentAddress>> StorePathCAMap;
/* Extension of derivations in the Nix store. */
const std::string drvExtension = ".drv";

View file

@ -1,5 +1,8 @@
#pragma once
#include <variant>
#include "hash.hh"
#include "path.hh"
#include <nlohmann/json_fwd.hpp>
#include "comparator.hh"

View file

@ -87,6 +87,8 @@ enum BuildMode { bmNormal, bmRepair, bmCheck };
struct BuildResult;
typedef std::map<StorePath, std::optional<ContentAddress>> StorePathCAMap;
struct StoreConfig : public Config
{
using Config::Config;