Inline settings.pluginFiles.name

In theory the warning is more noisy now, but in practice this will not
happen unless the client is older than 2.14 (highly unlikely).
This commit is contained in:
John Ericson 2024-07-02 15:00:39 -04:00
parent 846869da0e
commit 1a273a623f
2 changed files with 4 additions and 5 deletions

View file

@ -246,10 +246,9 @@ struct ClientSettings
// the daemon, as that could cause some pretty weird stuff // the daemon, as that could cause some pretty weird stuff
if (parseFeatures(tokenizeString<StringSet>(value)) != experimentalFeatureSettings.experimentalFeatures.get()) if (parseFeatures(tokenizeString<StringSet>(value)) != experimentalFeatureSettings.experimentalFeatures.get())
debug("Ignoring the client-specified experimental features"); debug("Ignoring the client-specified experimental features");
} else if (name == settings.pluginFiles.name) { } else if (name == "plugin-files") {
if (tokenizeString<Paths>(value) != settings.pluginFiles.get()) warn("Ignoring the client-specified plugin-files.\n"
warn("Ignoring the client-specified plugin-files.\n" "The client specifying plugins to the daemon never made sense, and was removed in Nix >=2.14.");
"The client specifying plugins to the daemon never made sense, and was removed in Nix >=2.14.");
} }
else if (trusted else if (trusted
|| name == settings.buildTimeout.name || name == settings.buildTimeout.name

View file

@ -128,7 +128,7 @@ void RemoteStore::setOptions(Connection & conn)
overrides.erase(settings.useSubstitutes.name); overrides.erase(settings.useSubstitutes.name);
overrides.erase(loggerSettings.showTrace.name); overrides.erase(loggerSettings.showTrace.name);
overrides.erase(experimentalFeatureSettings.experimentalFeatures.name); overrides.erase(experimentalFeatureSettings.experimentalFeatures.name);
overrides.erase(settings.pluginFiles.name); overrides.erase("plugin-files");
conn.to << overrides.size(); conn.to << overrides.size();
for (auto & i : overrides) for (auto & i : overrides)
conn.to << i.first << i.second.value; conn.to << i.first << i.second.value;