diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-12-05 18:04:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 18:04:41 +0100 |
commit | bfcf30f0abdfd1df4364919f203d04ff08d7314c (patch) | |
tree | 817212321f06e8cf7af8b47629e5902f61cf234f /src | |
parent | a21d9523b95fd7292a5a8825b1e772f7eda36ed9 (diff) | |
parent | e4f9f3bf246d66c57b07b45583469b98ba0db367 (diff) |
Merge pull request #7390 from Radvendii/fix-6383
check the store for input before failing (hopefully fix #6700)
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build/derivation-goal.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 67cfc38af..5aed51bcd 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -501,6 +501,14 @@ void DerivationGoal::inputsRealised() now-known results of dependencies. If so, we become a stub goal aliasing that resolved derivation goal. */ std::optional attempt = fullDrv.tryResolve(worker.store, inputDrvOutputs); + if (!attempt) { + /* TODO (impure derivations-induced tech debt) (see below): + The above attempt should have found it, but because we manage + inputDrvOutputs statefully, sometimes it gets out of sync with + the real source of truth (store). So we query the store + directly if there's a problem. */ + attempt = fullDrv.tryResolve(worker.store); + } assert(attempt); Derivation drvResolved { *std::move(attempt) }; |