mirror of
https://github.com/NixOS/nix
synced 2025-07-06 13:21:47 +02:00
Restrict some code to StoreDirConfig
- part of eval cache - part of derivations - derived path - store path with outputs - serializers
This commit is contained in:
parent
e97ac09abe
commit
dde1d86338
30 changed files with 175 additions and 157 deletions
|
@ -24,7 +24,7 @@ namespace nix {
|
|||
#define STDERR_RESULT 0x52534c54
|
||||
|
||||
|
||||
class Store;
|
||||
struct StoreDirConfig;
|
||||
struct Source;
|
||||
|
||||
// items being serialised
|
||||
|
@ -100,8 +100,8 @@ struct WorkerProto
|
|||
// This makes for a quicker debug cycle, as desired.
|
||||
#if 0
|
||||
{
|
||||
static T read(const Store & store, ReadConn conn);
|
||||
static void write(const Store & store, WriteConn conn, const T & t);
|
||||
static T read(const StoreDirConfig & store, ReadConn conn);
|
||||
static void write(const StoreDirConfig & store, WriteConn conn, const T & t);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -110,7 +110,7 @@ struct WorkerProto
|
|||
* infer the type instead of having to write it down explicitly.
|
||||
*/
|
||||
template<typename T>
|
||||
static void write(const Store & store, WriteConn conn, const T & t)
|
||||
static void write(const StoreDirConfig & store, WriteConn conn, const T & t)
|
||||
{
|
||||
WorkerProto::Serialise<T>::write(store, conn, t);
|
||||
}
|
||||
|
@ -197,8 +197,8 @@ inline std::ostream & operator << (std::ostream & s, WorkerProto::Op op)
|
|||
#define DECLARE_WORKER_SERIALISER(T) \
|
||||
struct WorkerProto::Serialise< T > \
|
||||
{ \
|
||||
static T read(const Store & store, WorkerProto::ReadConn conn); \
|
||||
static void write(const Store & store, WorkerProto::WriteConn conn, const T & t); \
|
||||
static T read(const StoreDirConfig & store, WorkerProto::ReadConn conn); \
|
||||
static void write(const StoreDirConfig & store, WorkerProto::WriteConn conn, const T & t); \
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue