-
-
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
Slight refactors in preparation for #10480 #10494
Conversation
Code operating on store objects (including creating them) should, in general, use `ContentAddressMethod` rather than `FileIngestionMethod`. See also dfc8765 which included some similar refactors.
@@ -2395,7 +2394,9 @@ static void prim_path(EvalState & state, const PosIdx pos, Value * * args, Value | |||
else if (n == "filter") | |||
state.forceFunction(*(filterFun = attr.value), attr.pos, "while evaluating the `filter` parameter passed to builtins.path"); | |||
else if (n == "recursive") | |||
method = FileIngestionMethod { state.forceBool(*attr.value, attr.pos, "while evaluating the `recursive` attribute passed to builtins.path") }; |
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.
Casting a bool is bad for relying on internal representation details too much, so I made it more explicit.
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.
I can't easily infer why this is an improvement, based on the documentation of the ContentAddressMethod
and FileIngestionMethod
types.
Specifically, it'd be good to describe how they relate, and perhaps add some guidance on which to pick, if we even need both.
Hehe very fair. #10479 and a follow-up for store object content addressing are supposed to finally, thoroughly answer that question. OK leaving this open until they are done! |
#10722 is the (barely started draft) of the follow-up I mentioned. |
OK I hope that #10722 is far enough along that we can make a decision on this :) |
Motivation
Code operating on store objects (including creating them) should, in general, use
ContentAddressMethod
rather thanFileIngestionMethod
.Context
#10480
See also dfc8765 which included some similar refactors.
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.