feat(libstore): add scanForReferencesDeep and use it for why-depends#14360
Merged
Ericson2314 merged 2 commits intoOct 27, 2025
Conversation
xokdvium
reviewed
Oct 25, 2025
f33a7ba to
42b0fd5
Compare
Ericson2314
reviewed
Oct 27, 2025
Ericson2314
reviewed
Oct 27, 2025
Comment on lines
-194
to
+195
| StringSet hashes; | ||
| StorePathSet refPaths; |
42b0fd5 to
a362c14
Compare
Ericson2314
reviewed
Oct 27, 2025
Ericson2314
reviewed
Oct 27, 2025
Ericson2314
reviewed
Oct 27, 2025
a362c14 to
7201e5b
Compare
edolstra
approved these changes
Oct 27, 2025
7201e5b to
9fb2d4c
Compare
…king Introduces `scanForReferencesDeep` to provide per-file granularity when scanning for store path references, enabling better diagnostics for cycle detection and `nix why-depends --precise`.
Replaces manual tree-walking and reference scanning with the new scanForReferencesDeep function.
9fb2d4c to
6129aee
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 27, 2025
feat(libstore): add scanForReferencesDeep and use it for why-depends
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Oct 28, 2025
…detailed feat(libstore): add scanForReferencesDeep and use it for why-depends
Merged
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
feat(libstore): add scanForReferencesDeep for per-file reference tracking
Introduces
scanForReferencesDeepto provide per-file granularity when scanning for store path references, enabling better diagnostics for cycle detection andnix why-depends --precise.refactor(nix/why-depends): use scanForReferencesDeep for --precise mode
Replaces manual tree-walking and reference scanning with the new scanForReferencesDeep function
Context
This is an attempt to carve out part of the work in #14218
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.