mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 06:01:00 +01:00
Gate the external gc behind an xp feature flag
This commit is contained in:
parent
240f1614d8
commit
8de54ed4e1
4 changed files with 7 additions and 1 deletions
|
|
@ -283,6 +283,8 @@ void LocalStore::findRootsNoTemp(Roots & roots, bool censor)
|
||||||
if (::connect(fd.get(), (struct sockaddr *) &addr, sizeof(addr)) == -1)
|
if (::connect(fd.get(), (struct sockaddr *) &addr, sizeof(addr)) == -1)
|
||||||
return findRootsNoTempNoExternalDaemon(roots, censor);
|
return findRootsNoTempNoExternalDaemon(roots, censor);
|
||||||
|
|
||||||
|
settings.requireExperimentalFeature(Xp::ExternalGCDaemon);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (true) {
|
while (true) {
|
||||||
auto line = readLine(fd.get());
|
auto line = readLine(fd.get());
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ std::map<ExperimentalFeature, std::string> stringifiedXpFeatures = {
|
||||||
{ Xp::NixCommand, "nix-command" },
|
{ Xp::NixCommand, "nix-command" },
|
||||||
{ Xp::RecursiveNix, "recursive-nix" },
|
{ Xp::RecursiveNix, "recursive-nix" },
|
||||||
{ Xp::NoUrlLiterals, "no-url-literals" },
|
{ Xp::NoUrlLiterals, "no-url-literals" },
|
||||||
|
{ Xp::ExternalGCDaemon, "external-gc-daemon" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name)
|
const std::optional<ExperimentalFeature> parseExperimentalFeature(const std::string_view & name)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ enum struct ExperimentalFeature
|
||||||
Flakes,
|
Flakes,
|
||||||
NixCommand,
|
NixCommand,
|
||||||
RecursiveNix,
|
RecursiveNix,
|
||||||
NoUrlLiterals
|
NoUrlLiterals,
|
||||||
|
ExternalGCDaemon,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
source common.sh
|
source common.sh
|
||||||
|
|
||||||
|
sed -i 's/experimental-features .*/& external-gc-daemon/' "$NIX_CONF_DIR"/nix.conf
|
||||||
|
|
||||||
export NIX_GC_SOCKET_PATH=$TEST_ROOT/gc.socket
|
export NIX_GC_SOCKET_PATH=$TEST_ROOT/gc.socket
|
||||||
startGcDaemon() {
|
startGcDaemon() {
|
||||||
# Start the daemon, wait for the socket to appear. !!!
|
# Start the daemon, wait for the socket to appear. !!!
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue