Repository navigation
libexpr: rethrow failed realisation error - #16682
Open
DerDennisOP wants to merge 3 commits into
Open
DerDennisOP wants to merge 3 commits into
DerDennisOP wants to merge 3 commits into
Conversation
DerDennisOP
force-pushed
the
realise-failure-memo
branch
2 times, most recently
from
October 25, 2026 19:20
2abf39f to
b9e7cdb
Compare
DerDennisOP
force-pushed
the
realise-failure-memo
branch
2 times, most recently
from
November 9, 2026 14:59
88f6058 to
1426643
Compare
added 2 commits
November 9, 2026 16:07
A cached string's context paths each required one `isValidPath` call from `getStringWithContext()`. Each path cost a daemon round-trip. The function switched to `addTempRoot` for each path. Those calls deduplicate per connection in `RemoteStore`. A single `queryValidPaths` call can check all paths.
DerDennisOP
force-pushed
the
realise-failure-memo
branch
2 times, most recently
from
November 9, 2026 15:47
fcec489 to
cece21c
Compare
Attributes that import the same failing derivation ask the store to build that derivation again. Many attributes import the same broken derivation. These importers cause one attempt each. The output lock of the store serialized concurrent evaluator attempts. Build with `buildPathsWithResults`. Save a copy of the build error for each derivation that failed alone. Reasons include failure of the builder, rejection of inputs or outputs, hash mismatch and log limit. Same for a timeout. A second attempt can wait for the full timeout again. Rethrow that copy rather than rebuild. Rebuild transient failures such as network errors from a substituter, dependency failure and loss of the daemon connection. The `:reload` command in the REPL can call `resetFileCache()`. Stored failures disappear after `resetFileCache()`.
DerDennisOP
force-pushed
the
realise-failure-memo
branch
from
November 9, 2026 16:35
cece21c to
66ee8e9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
I run a small CI system. Many attributes of a flake import the same derivation. Attributes that import a failing derivation cause the store to build that derivation again. Importers each trigger one attempt for a broken derivation. Concurrent evaluator attempts serialize on the lock for a store output.
Context
The evaluator can now keep a copy of the exception for each
EvalStateand rethrow that copy for the rest of its lifetime. The evaluator can capture the copy before the exception propagates. Handlers add traces to a caught exception. Tests check that a replayed failure and the first failure have the same number of traces.The changes sit atop #16677. The test store and its
DummyStoreImplheader come from that PR.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.