lix/src/libstore/build
Maximilian Bosch bb1a851bcf
build: also throw hash-mismatch errors if buildMode == bmCheck
This actually bit me quite recently in `nixpkgs` because I assumed that
`nix-build --check` would also error out if hashes don't match anymore[1]
and so I wrongly assumed that I couldn't reproduce the mismatch error.

The fix is rather simple, during the output registration a so-called
`delayedException` is instantiated e.g. if a FOD hash-mismatch occurs.
However, in case of `nix-build --check` (or `--rebuild` in case of `nix
build`), the code-path where this exception is thrown will never be
reached.

By adding that check to the if-clause that causes an early exit in case
of `bmCheck`, the issue is gone. Also added a (previously failing)
test-case to demonstrate the problem.

[1] https://github.com/NixOS/nixpkgs/pull/139238, the underlying issue
    was that `nix-prefetch-git` returns different hashes than `fetchgit`
    because the latter one fetches submodules by default.
2021-09-27 15:44:39 +02:00
..
derivation-goal.cc RunOptions: Use designated initializers 2021-09-13 23:31:04 +02:00
derivation-goal.hh Properly sign the unresolved drvs 2021-03-15 16:35:17 +01:00
drv-output-substitution-goal.cc Display the diverging paths in case of a realisation mismatch 2021-06-23 11:27:16 +02:00
drv-output-substitution-goal.hh Allow substituting drv outputs when building 2021-03-01 14:00:17 +01:00
entry-points.cc buildPaths(): Add an evalStore argument 2021-07-22 09:59:51 +02:00
goal.cc libstore: use set instead of list for waiter list 2021-08-08 14:05:38 +02:00
goal.hh libstore: use set instead of list for waiter list 2021-08-08 14:05:38 +02:00
hook-instance.cc Change .cc files to use split build headers 2020-10-12 17:08:52 +00:00
hook-instance.hh Trim hook-instance.hh 2020-10-12 17:16:13 +00:00
local-derivation-goal.cc build: also throw hash-mismatch errors if buildMode == bmCheck 2021-09-27 15:44:39 +02:00
local-derivation-goal.hh Make CA derivations compatible with recursive Nix 2021-06-24 14:53:10 +02:00
substitution-goal.cc copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
substitution-goal.hh PathSubstitutionGoal: Clean up pipe 2021-04-07 12:21:31 +02:00
worker.cc buildPaths(): Add an evalStore argument 2021-07-22 09:59:51 +02:00
worker.hh buildPaths(): Add an evalStore argument 2021-07-22 09:59:51 +02:00