1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 00:51:47 +02:00

Convert Settings to the new config system

This makes all config options self-documenting.

Unknown or unparseable config settings and --option flags now cause a
warning.
This commit is contained in:
Eelco Dolstra 2017-04-13 20:53:23 +02:00
parent 6bd9576aeb
commit ba9ad29fdb
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
18 changed files with 348 additions and 546 deletions

View file

@ -795,11 +795,11 @@ static void opServe(Strings opFlags, Strings opArgs)
settings.maxSilentTime = readInt(in);
settings.buildTimeout = readInt(in);
if (GET_PROTOCOL_MINOR(clientVersion) >= 2)
in >> settings.maxLogSize;
settings.maxLogSize = readNum<unsigned long>(in);
if (GET_PROTOCOL_MINOR(clientVersion) >= 3) {
settings.set("build-repeat", std::to_string(readInt(in)));
settings.set("enforce-determinism", readInt(in) != 0 ? "true" : "false");
settings.set("run-diff-hook", "true");
settings.buildRepeat = readInt(in);
settings.enforceDeterminism = readInt(in);
settings.runDiffHook = readInt(in);
}
settings.printRepeatedBuilds = false;
};