aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-09-30 00:39:06 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-09-30 00:39:06 +0000
commit45a0ed82f089158a79c8c25ef844c55e4a74fc35 (patch)
treeddc7d1644214b7cc8ca448c99e4395af179c7b29 /src/nix-store/nix-store.cc
parente9fc2031f0c89fe65609ce6a8211186d164152fb (diff)
Revert "Use template structs instead of phantoms"
This reverts commit 9ab07e99f527d1fa3adfa02839da477a1528d64b.
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 141dab478..4dcdebe2f 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -822,7 +822,7 @@ static void opServe(Strings opFlags, Strings opArgs)
case cmdQueryValidPaths: {
bool lock = readInt(in);
bool substitute = readInt(in);
- auto paths = WorkerProto<StorePathSet>::read(*store, in);
+ auto paths = nix::worker_proto::read(*store, in, Phantom<StorePathSet> {});
if (lock && writeAllowed)
for (auto & path : paths)
store->addTempRoot(path);
@@ -852,19 +852,19 @@ static void opServe(Strings opFlags, Strings opArgs)
}
}
- WorkerProto<StorePathSet>::write(*store, out, store->queryValidPaths(paths));
+ nix::worker_proto::write(*store, out, store->queryValidPaths(paths));
break;
}
case cmdQueryPathInfos: {
- auto paths = WorkerProto<StorePathSet>::read(*store, in);
+ auto paths = nix::worker_proto::read(*store, in, Phantom<StorePathSet> {});
// !!! Maybe we want a queryPathInfos?
for (auto & i : paths) {
try {
auto info = store->queryPathInfo(i);
out << store->printStorePath(info->path)
<< (info->deriver ? store->printStorePath(*info->deriver) : "");
- WorkerProto<StorePathSet>::write(*store, out, info->references);
+ nix::worker_proto::write(*store, out, info->references);
// !!! Maybe we want compression?
out << info->narSize // downloadSize
<< info->narSize;
@@ -892,7 +892,7 @@ static void opServe(Strings opFlags, Strings opArgs)
case cmdExportPaths: {
readInt(in); // obsolete
- store->exportPaths(WorkerProto<StorePathSet>::read(*store, in), out);
+ store->exportPaths(nix::worker_proto::read(*store, in, Phantom<StorePathSet> {}), out);
break;
}
@@ -941,9 +941,9 @@ static void opServe(Strings opFlags, Strings opArgs)
case cmdQueryClosure: {
bool includeOutputs = readInt(in);
StorePathSet closure;
- store->computeFSClosure(WorkerProto<StorePathSet>::read(*store, in),
+ store->computeFSClosure(nix::worker_proto::read(*store, in, Phantom<StorePathSet> {}),
closure, false, includeOutputs);
- WorkerProto<StorePathSet>::write(*store, out, closure);
+ nix::worker_proto::write(*store, out, closure);
break;
}
@@ -958,7 +958,7 @@ static void opServe(Strings opFlags, Strings opArgs)
};
if (deriver != "")
info.deriver = store->parseStorePath(deriver);
- info.references = WorkerProto<StorePathSet>::read(*store, in);
+ info.references = nix::worker_proto::read(*store, in, Phantom<StorePathSet> {});
in >> info.registrationTime >> info.narSize >> info.ultimate;
info.sigs = readStrings<StringSet>(in);
info.ca = parseContentAddressOpt(readString(in));