-
Notifications
You must be signed in to change notification settings - Fork 24
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
Downgrading hard + version-bound dependencies #83
Comments
Hi there, as I mentioned in the original issue:
So do feel free to explore this.
Hmm, I'm really not sure. It'll be a large change that will take some time to get done (I think) so an approach that keeps things mostly isolated from the existing code would provide the best chance of it getting reviewed and merged. I imagine the process would have to work something like:
(3) and (4) seems like the biggest risks, so I might begin by simply working on those in total isolation. If that can't be solved, there's no use in going any further. As an alternative: Downgrade's usage is flexible enough to be used as part of this process:
Therefore, if some external tool could sort out the dependency graph of a multi-package downgrade, you could simply pass that tool's output to That approach is super attractive to me because it's very UNIX and leverages downgrade without bloating it. But the major downside is that downgrade is also good at taking a package name and prompting you based on Cache and ARM as to what you might want to install. That makes this tricky. What about something like this: % downgrade firefox --print | fzf | downgrade-dependencies | xargs downgrade
Even if we do eventually decide to fold things into |
Hi again. I agree with this and I think it is a good idea to develop a separate pipeline which essentially finds dependencies and uses Do you have any recommendations for a specific language to use? I am not too familiar with perl so I would probably just go with shell, and perhaps some scripts in python for checking dependency graphs. I will be quite busy in the coming 2-3 weeks, but will try to push a prototype in the new year. Will keep in touch. PS: Sorry I closed the issue by mistake. |
Oh, that'd be totally up to you. Back when I wrote This logic feels complex enough that I'd want to do it in not shell, personally. Python, if you know it, seems like a good compromise between language features and ease of distribution. |
Hi man! So once again back to this issue. I have been thinking of how we could tackle this and I wanted to get your thoughts again. So to make things simple, I would like to identify one example of a package that has a hard dependency, so that we both could refer to it. The simplest one I could think of is
So the hard dependency here is
I have two perspectives here which I can't reconcile with on my own. 1. Downgrade should manage hard-dependenciesOn one-hand, a user might expect However, there are some possible issues. If you simply execute Also, in the extremely unlikely case that there exist some circular hard dependencies, we might mess things up with forcing a downgrade. Hopefully pacman would be able to catch that and stop such a downgrade. 2. Downgrade is inherently interactive and should not automatically manage hard-dependenciesAnother perspective here is that In the case of In this perspective, downgrade not handling hard dependencies is a feature and not a bug. Moving forwardI think the decision on what to do really depends on how we envision If we go with perspective 2, then we probably would not have to do anything further. This seems convenient, but somehow leaves a bad taste in my mouth knowing we did not try to do something that we could. Would be great to get your thoughts. |
Thank you very much for all of these details! I think, as you mentioned, the dependency problem is very hard and there are lots of unknowns regarding what cases we can robustly solve, which edge-cases we might have to choose not to solve, and how complex and maintainable will the solution be. And there's the question of if it's part of I'm not looking for answers to all these questions today, I'm more painting a picture that it's a big ball of unknowns, which means the more we can de-risk it, and experiment in a non-disruptive way, the better. To that end, here are my thoughts: My gut says dependencies are not worth solving. So I lean towards (2). However, I do not want to quell your enthusiasm, so if I were going to explore (1), here's how I would get started: 1- I would fix the bug in (2)😂 You should test this, but I think since we do If you fixed that bug, then 2- I would add a temporary, undocumented
|
Thank you for the detailed feedback. While I am enthusiastic, I do feel that this would be too big a development now and there are perhaps some loose ends to tie up before we can do a full-fledged dependencies handling procedure for
Based on my personal tests and understanding,
I agree with the workflow that you suggested and that would be an ideal way of going through the process without affecting the code in Short-term solutionAs a pre-cursor to a long-term solution, I think it would be good if we could fix some version bounds handling directly in
And the selection output of this would be the filtered output with only relevant versions. This would contribute to two positive things: firstly allowing the user to directly filter version bounds and secondly allowing us to handle possible dependency bounds issues based on my comment yesterday. Once this is solved, then we essentially would have all the tools necessary to handle dependencies and would just have to follow a procedure similar to what you mentioned to make it happen. What do you think? |
Ah, of course! Sorry I was mistaken there.
That sounds like a great feature to me! I would like to see the current non-interactive behavior retained with that feature too. I.e. if you pass in any argument (exact or bounds) that results in only a single choice, it is installed without interactive selection. |
Closing this in favor of #208. |
Hello @pbrisbin,
Thank you for making this awesome tool, it's really useful! Going back to issue #19, I think it might be really useful to have dependency management while downgrading a package. I understand you mentioned that you don't want to add it, but would it be possible to see how this works if I submit a PR?
If so, it would be great if you could advise me which area of the code you can envision this coming in; that would make it slightly quicker :)
The text was updated successfully, but these errors were encountered: