-
Notifications
You must be signed in to change notification settings - Fork 16
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
Reverse dependencies (--query --referrers
)
#26
Comments
Interesting thought, and I can see how this is useful. However, there's a conceptual issue that I've been thinking about for a while; since there is a vaguely similar issue, #15. The reason I'm finding this hard to think about is that it changes the way how the
Initially I was imaging how this feature would work is that it would start with the passed path, going towards the right pane would take it to that paths dependencies, but going to the left pane would navigate through the passed paths parents. But this actually does not work, because once you move left from the selected path, the meaning of the panes change. So, the second option would be to have a "flipped" version of nix-tree, where it starts with the selected path in the middle, right pane is empty, and the left pane contains all paths that depend on the selected path. This is already hard to think about (even for me as the tool author). And it doesn't solve all the issues, since it is kind of like the "why-depends" functionality, but not quite; also it is kind of like #15 , but also not quite. I feel like there's a nice design somewhere, but I am failing to grasp it. I'd be happy to discuss this more, so it would really help if you (or maybe @wmertens) could explain what you're thinking about how this functionality would work a bit more (eg. how would you invoke this, is it a command line flag or a shortcut when navigating nix-tree, or even extending the default view, how would you navigate through them). |
Just as a data point, could you also tell how is it useful? I can not remember when I had to do a query over the entire /nix/store, since in my mental model what you have in /nix/store other than what's reachable from your gcroots does not mean much, it's just a cache. One useful query I'm thinking of would be something like "why isn't this path garbage collected", or "why do I have that path on my system", and for these questions issue #23 (with the existing search and why-depends functionalities) can be a more to-the-point solution. |
Thanks for your detailed answer! I was having a look at your references, and I think I get the point. I rephrase:
I was not completely aware about this design desicion of In other words, a shortcut that displays all direct reverse dependencies of the focussed element in the left pane. Does this make sense? Use cases are manyfold. One that comes to my mind right now: I perform a system update. I see that package |
Quick question:
Are you aware of the |
I was not aware of this shortcut, and it somewhat fulfills this need. However, I can not really start |
I think this is the root cause. There really is no excuse of I think solving the performance issue, then it might solve your problem too.
I really think "reverse dependencies" without a specific "root" does not make much sense, as store paths that are not reachable from your GC roots are only incidentally there. However, you are right that it is very sensible to ask for the case where the roots might be "all gcroots", or "my current system/profiles". So, I feel like you'd invoke something like However, as you mentioned, currently it really is not feasible to run nix-tree over the entire gcroots; and that has to be fixed. Assuming |
I think that would be a good solution! Usually, I have to find the store path anyways before executing |
@dschrempf Thanks, I will create an issue for the optimisation. (By the way, it seems like you're both an Haskeller and use graphs; and coincidentely the performance issue of |
Haha 😄, I would be glad to help (but I am not sure if I can). I close this for now since you will anyways open another issue. |
looks like this can be done with |
Hi!
Thank you for developing this tool!
I was wondering if it is feasible to include a way to inspect reverse dependencies? Specifially, I was thinking about a way to add information obtained from
nix-store --query --referrers
. I need this command quite often, and it is very long (and hard to remember).Thanks for you input!
Dominik
The text was updated successfully, but these errors were encountered: