Skip to content

Conversation

lovesegfault
Copy link
Member

@lovesegfault lovesegfault commented Oct 1, 2025

Motivation

Fixes: #14130 (maybe?)

Context

Claude-aided debugging:

  1. A derivation has multiple outputs (e.g., out and dev)
  2. One output (out) is already valid in the store
  3. Another output (dev) is NOT valid
  4. User requests to build the already-valid output (out)
  5. Since not ALL outputs are valid, DerivationGoal cannot return early—it must proceed with the build
  6. DerivationGoal delegates to DerivationBuildingGoal to rebuild the entire derivation
  7. In registerOutputs() (derivation-builder.cc:1383-1388), already-valid outputs are skipped to avoid unnecessary re-registration
  8. The wantedOutput (out) is skipped, so it's NOT added to builtOutputs
  9. Back in DerivationGoal, the code tries to filter builtOutputs to only contain wantedOutput
  10. Assertion fails because wantedOutput is not in builtOutputs

I'm still trying to write a reproducer to validate...


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@Ericson2314 Ericson2314 marked this pull request as draft October 1, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nix develop erroring out with core dump on 2.31.*
1 participant