diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-12-12 09:40:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 09:40:36 +0100 |
commit | c00fb26bed74531882c8f059094bf9e74a715c08 (patch) | |
tree | 9ecaa0efaeb63c45cd8567e8104caebd5500ec85 | |
parent | 145e9a81230604baae706371cd19861ba9da3766 (diff) | |
parent | dbc854766498818917c47ebce302266e92b41433 (diff) |
Merge pull request #7441 from andir/ignoreEnforceDeterminism
Ignore the enforceDeterminism value
-rw-r--r-- | src/nix-store/nix-store.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index b854ef1e7..85f142c39 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -808,12 +808,15 @@ static void opServe(Strings opFlags, Strings opArgs) if (GET_PROTOCOL_MINOR(clientVersion) >= 2) settings.maxLogSize = readNum<unsigned long>(in); if (GET_PROTOCOL_MINOR(clientVersion) >= 3) { - if (readInt(in) != 0) { + auto nrRepeats = readInt(in); + if (nrRepeats != 0) { throw Error("client requested repeating builds, but this is not currently implemented"); } - if (readInt(in) != 0) { - throw Error("client requested enforcing determinism, but this is not currently implemented"); - } + // Ignore. It used to be true by default, but also only never had any effect when `nrRepeats == 0`. + // We have already asserted that `nrRepeats` in fact is 0, so we can safely ignore this without + // doing something other than what the client asked for. + auto _enforceDeterminism = readInt(in); + settings.runDiffHook = true; } if (GET_PROTOCOL_MINOR(clientVersion) >= 7) { |