-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetchToStore(): Avoid duplicate copying if the input is already a store path #10511
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need isStorePath
? I don't think so
// an FSInputAccessor pointing to a store path. | ||
if (path.accessor->isStorePath | ||
&& path.path.isRoot() | ||
&& method == FileIngestionMethod::Recursive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What goes wrong if we skip this? I am trying to special-case NAR hashing less in Nix currently.
&& method == FileIngestionMethod::Recursive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant that to not be approval
We do need that to ensure it's only used for store paths where we know their ingestion method. As mentioned above, the architecturally cleaner way is to make |
I think I rather solve this in a different way:
I am still hoping |
If you could take a stab at #10467 (review) @edolstra, I would be happy to take on this one per my plan above. |
…re path This is needed for the path:// input scheme (until it returns a FSInputAccessor to the original path, but that's blocked by NixOS#10089) and the Mercurial input scheme.
893c383
to
8d08846
Compare
Motivation
This is needed for the path:// input scheme (until it returns a
FSInputAccessor
to the original path, but that's blocked by #10089) and the Mercurial input scheme.Note: it would be cleaner to have
fetchToStore()
as an overridable method onInputAccessor
(as was originally the case), but the latter got moved tolibutil
so we can't do that anymore.Context
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.