libstore: introduce CanonicalizePathMetadataOptions for canonicalisePathMetaData#15119
Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom Feb 3, 2026
Merged
Conversation
12f3f1f to
093b225
Compare
Ericson2314
approved these changes
Jan 29, 2026
Member
Ericson2314
left a comment
There was a problem hiding this comment.
I split the history for posterity's sake
`LocalStore` and `canonicalisePathMetaData` are defined on Windows by now, so we don't have to gate their usage like this.
093b225 to
37be9be
Compare
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Jan 30, 2026
…em meta data This should not happen now, but instead happen after - NixOS#15119 - NixOS#15060 - Sergei's upcoming new `Descriptor`-based `SourceAccessor` I suspect what we'll want to do is expose that source accessor after all, so we can have some extra methods to get at the underlying file descriptors. (Or, conversely, maybe this won't be necessary, because enough of the underlying logic will be factored into `file-descriptor.hh` functions that the `SourceAccessor` itself will be a small wrapper.) Either way, at that point we'll not be duplicating stuff here, nor will be lacking a foundation on Windows, and we can then finish the job.
37be9be to
7400638
Compare
Ericson2314
reviewed
Jan 30, 2026
Comment on lines
+1594
to
+1595
| // builder UIDs are already dealt with | ||
| .uidRange = std::nullopt, |
Member
There was a problem hiding this comment.
This is not a change in behavior, this is just making the default value (before and after this PR) explicit, and documenting why.
Ericson2314
reviewed
Jan 30, 2026
| // builder UIDs are already dealt with | ||
| .uidRange = std::nullopt, |
…sePathMetaData` This commit refactors the `canonicalisePathMetaData` function to take an options struct instead of individual parameters with platform-specific `#ifdef`s. The struct contains a `uidRange` field (Unix only) for build user ownership validation, and an `ignoredAcls` field for ACLs to skip when removing extended attributes
7400638 to
d09f03d
Compare
This was referenced Feb 2, 2026
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Feb 5, 2026
…em meta data This should not happen now, but instead happen after - NixOS#15119 - NixOS#15060 - Sergei's upcoming new `Descriptor`-based `SourceAccessor` I suspect what we'll want to do is expose that source accessor after all, so we can have some extra methods to get at the underlying file descriptors. (Or, conversely, maybe this won't be necessary, because enough of the underlying logic will be factored into `file-descriptor.hh` functions that the `SourceAccessor` itself will be a small wrapper.) Either way, at that point we'll not be duplicating stuff here, nor will be lacking a foundation on Windows, and we can then finish the job.
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Feb 5, 2026
…em meta data This should not happen now, but instead happen after - NixOS#15119 - NixOS#15060 - Sergei's upcoming new `Descriptor`-based `SourceAccessor` I suspect what we'll want to do is expose that source accessor after all, so we can have some extra methods to get at the underlying file descriptors. (Or, conversely, maybe this won't be necessary, because enough of the underlying logic will be factored into `file-descriptor.hh` functions that the `SourceAccessor` itself will be a small wrapper.) Either way, at that point we'll not be duplicating stuff here, nor will be lacking a foundation on Windows, and we can then finish the job.
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
This commit refactors the
canonicalisePathMetaDatafunction to take an options struct instead of individual parameters with platform-specific#ifdefs.The struct contains a
uidRangefield (Unix only) for build user ownership validation, and anignoredAclsfield for ACLs to skip when removing extended attributes.Context
This PR splits out some work from #15101
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.