1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 09:49:36 +01:00

Store::registerDrvOutput make pure virtual

It should be the responsibility of implementations that don't implement
it to say so.

See also PR #9799, and issue #5729
This commit is contained in:
John Ericson 2025-09-27 16:03:43 -04:00
parent d76dc2406f
commit 88bd0c25f2
3 changed files with 12 additions and 5 deletions

View file

@ -258,6 +258,11 @@ struct DummyStore : virtual Store
return path;
}
void registerDrvOutput(const Realisation & output) override
{
unsupported("registerDrvOutput");
}
void narFromPath(const StorePath & path, Sink & sink) override
{
bool visited = contents.cvisit(path, [&](const auto & kv) {

View file

@ -109,7 +109,7 @@ struct LegacySSHStore : public virtual Store
unsupported("addToStore");
}
virtual StorePath addToStoreFromDump(
StorePath addToStoreFromDump(
Source & dump,
std::string_view name,
FileSerialisationMethod dumpMethod = FileSerialisationMethod::NixArchive,
@ -121,6 +121,11 @@ struct LegacySSHStore : public virtual Store
unsupported("addToStore");
}
void registerDrvOutput(const Realisation & output) override
{
unsupported("registerDrvOutput");
}
public:
BuildResult buildDerivation(const StorePath & drvPath, const BasicDerivation & drv, BuildMode buildMode) override;

View file

@ -598,10 +598,7 @@ public:
* floating-ca derivations and their dependencies as there's no way to
* retrieve this information otherwise.
*/
virtual void registerDrvOutput(const Realisation & output)
{
unsupported("registerDrvOutput");
}
virtual void registerDrvOutput(const Realisation & output) = 0;
virtual void registerDrvOutput(const Realisation & output, CheckSigsFlag checkSigs)
{