-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
libstore-c: add nix_store_get_fs_closure #14025
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
base: master
Are you sure you want to change the base?
libstore-c: add nix_store_get_fs_closure #14025
Conversation
3267618
to
9237e52
Compare
* @param[out] context Optional, stores error information | ||
* @param[in] store nix store reference | ||
* @param[in] store_path The path to compute from | ||
* @param[in] flip_direction |
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.
@roberth is the right thing to just copy the doc from the C++ function?
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.
If the docs are good, then that's fine
* @param[in] callback The function to call for every store path | ||
* @param[in] userdata The userdata to pass to the callback | ||
*/ | ||
nix_err nix_store_get_fs_closure( |
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 think it would be better to put this above nix_store_realise
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.
Done
I assigned to @roberth as he is defacto code owner of this. |
9237e52
to
d93cd0a
Compare
src/libstore-c/nix_api_store.h
Outdated
* @param[in] flip_direction | ||
* @param[in] include_outputs | ||
* @param[in] include_derivers | ||
* @param[in] callback The function to call for every store 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.
Let's afford the impl some more freedom
* @param[in] callback The function to call for every store path | |
* @param[in] callback The function to call for every store path, in no particular order |
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.
Done
d93cd0a
to
1f8a5cc
Compare
Oh and actually I would like to not expose flip direction, as many stores don't support the reverse direction. (I had an old blocked store API PR fo this, it would be nice to not repeat the same IMO mistake in the C API.) |
Should the C++ API reflect that? Imo, I prefer having feature parity to the C++ API as close as C can get. |
Is it feasible to create a small store path graph using the store operations at this point? |
I think we're close to making that possible, I'm not sure what else is needed but I think it may be possible. |
Motivation
Adds a way to call the store API's
computeFSClosure
function from C.Context
I'd like to be able to call this from the nixops4 Rust bindings.
Upstreams DeterminateSystems#209
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.