fetchToStore(): Avoid duplicate copying if the input is already a store path#10511
fetchToStore(): Avoid duplicate copying if the input is already a store path#10511edolstra wants to merge 2 commits intoNixOS:masterfrom
Conversation
Ericson2314
left a comment
There was a problem hiding this comment.
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.
What goes wrong if we skip this? I am trying to special-case NAR hashing less in Nix currently.
| && method == FileIngestionMethod::Recursive |
Ericson2314
left a comment
There was a problem hiding this comment.
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
FSInputAccessorto 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 tolibutilso 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.