Repository navigation
Use getFSSourceAccessor only for the evaluator's root file system - #16854
Open
Ericson2314 wants to merge 4 commits into
Open
Ericson2314 wants to merge 4 commits into
Ericson2314 wants to merge 4 commits into
Conversation
Ericson2314
force-pushed
the
registry-fs-accessor
branch
from
November 19, 2026 22:23
8dec010 to
f9f1c75
Compare
xokdvium
reviewed
Nov 19, 2026
Comment on lines
126
to
127
| static auto systemRegistry = readMaybeHostRegistry(settings, getSystemRegistryPath(), Registry::System); | ||
| return systemRegistry; |
Contributor
There was a problem hiding this comment.
Isn't there an existing PR that just reads the stuff into a memory source accessor now?
Member
Author
There was a problem hiding this comment.
There is, it is #16481, I will rebase that on top.
Ericson2314
force-pushed
the
registry-fs-accessor
branch
from
November 19, 2026 23:40
f9f1c75 to
ef8bc3f
Compare
Its root is an empty directory, which exists, rather than nothing at all, which is easy to forget when using it for a path that should not exist. Assisted-by: Claude Code (Claude Opus 5.5)
Ericson2314
force-pushed
the
registry-fs-accessor
branch
2 times, most recently
from
November 19, 2026 23:46
2b23f64 to
2d3eea1
Compare
xokdvium
reviewed
Nov 19, 2026
Comment on lines
+800
to
+801
| auto [trackLastModified, finalSymlink, requireAbsolute] = params; | ||
| assert(!requireAbsolute || root.is_absolute()); |
Contributor
There was a problem hiding this comment.
This will mess up showPath and getPhysicalPath and whatnot.
Member
Author
There was a problem hiding this comment.
Oh bummer, because our absPath is sketchy.
Member
Author
There was a problem hiding this comment.
Fixed but left a TODO
xokdvium
reviewed
Nov 19, 2026
Ericson2314
force-pushed
the
registry-fs-accessor
branch
from
November 19, 2026 23:52
2d3eea1 to
eaae58f
Compare
`trackLastModified` and `finalSymlink` move into `MakeFSSourceAccessorParams`, so that callers can set just the one they need with designated initializers, rather than spelling out the defaults before it. It also gets `requireAbsolute`, default true, for callers that take a user-given path: with it false, a relative root is made absolute with `absPath`, rather than each caller doing so first. Assisted-by: Claude Code (Claude Opus 5.5)
…::read` `push_back` already says it is a `Registry::Entry`. Also put one field per line with a trailing comma, as elsewhere. Assisted-by: Claude Code (Claude Opus 5.5)
The flake registries and `--reference-lock-file` now read their file
through an accessor from `makeFSSourceAccessor`, rather than one for the
whole host file system.
That leaves the evaluator's root file system, which now calls
`makeFSSourceAccessor("/")` itself, with a comment explaining why it is
the one place that should read the whole host file system.
`makeFSSourceAccessorOrError` handles files that may not exist, without
having to check first.
Also while we are at it, use `ref<Registry>` not
`std::shared_ptr<Registry>` in a number of places to indicate non-null.
Assisted-by: Claude Code (Claude Opus 5.5)
Ericson2314
force-pushed
the
registry-fs-accessor
branch
from
November 20, 2026 00:03
eaae58f to
96aa823
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.
The flake registries and
--reference-lock-filenow read their file through an accessor frommakeFSSourceAccessor, rather than one for the whole host file system.getFSSourceAccessorwould be lovely to delete. But it is used in one spot we cannot get rid of. See the new doxygen from it.Also while we are at it, use
ref<Registry>notstd::shared_ptr<Registry>in a number of places to indicate non-null.Assisted-by: Claude Code (Claude Opus 5.5)
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.