Skip to content

Commit 251479b

Browse files
authored
Merge pull request #14127 from obsidiansystems/registerDrvOutput-no-blanket-unsupported
`Store::registerDrvOutput` make pure virtual
2 parents 772a380 + 88bd0c2 commit 251479b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/libstore/dummy-store.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ struct DummyStore : virtual Store
258258
return path;
259259
}
260260

261+
void registerDrvOutput(const Realisation & output) override
262+
{
263+
unsupported("registerDrvOutput");
264+
}
265+
261266
void narFromPath(const StorePath & path, Sink & sink) override
262267
{
263268
bool visited = contents.cvisit(path, [&](const auto & kv) {

src/libstore/include/nix/store/legacy-ssh-store.hh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct LegacySSHStore : public virtual Store
109109
unsupported("addToStore");
110110
}
111111

112-
virtual StorePath addToStoreFromDump(
112+
StorePath addToStoreFromDump(
113113
Source & dump,
114114
std::string_view name,
115115
FileSerialisationMethod dumpMethod = FileSerialisationMethod::NixArchive,
@@ -121,6 +121,11 @@ struct LegacySSHStore : public virtual Store
121121
unsupported("addToStore");
122122
}
123123

124+
void registerDrvOutput(const Realisation & output) override
125+
{
126+
unsupported("registerDrvOutput");
127+
}
128+
124129
public:
125130

126131
BuildResult buildDerivation(const StorePath & drvPath, const BasicDerivation & drv, BuildMode buildMode) override;

src/libstore/include/nix/store/store-api.hh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,7 @@ public:
598598
* floating-ca derivations and their dependencies as there's no way to
599599
* retrieve this information otherwise.
600600
*/
601-
virtual void registerDrvOutput(const Realisation & output)
602-
{
603-
unsupported("registerDrvOutput");
604-
}
601+
virtual void registerDrvOutput(const Realisation & output) = 0;
605602

606603
virtual void registerDrvOutput(const Realisation & output, CheckSigsFlag checkSigs)
607604
{

0 commit comments

Comments
 (0)