-
Notifications
You must be signed in to change notification settings - Fork 36
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
Unreliable Dependecies resolution #259
Comments
The cause is, that data structures are being used by the dependency solver which do not preserve the order, since they are only used for "is it inside?" and "is it not inside?". Normally that's not a problem, but with this Unfortunate, but I guess I'll never change anything about it, because the real problem is the package. "Fixing" it is not even really possible, I could "fix" the consistency of |
This looks like a serious flaw in aurman. |
To be honest: It is not. I do not feel like explaining why this is the case, because you have to look deep into the algorithm. Trust me with it or do not, I am nevertheless not going to change anything here |
The equivalent of this behavior is if the AUR RPC would send the dependencies in a different order. You have to start "somewhere" when solving dependencies, and you can do that at the first item. The result is going to change then, if you are dealing with e. g. this mingw fuckery |
Thanks! Will look into mingw packages then |
Looks to me as yet another case of unnecessary complex implementation that results in naughty side effects - solving the mingw bootstrap issue that ends up breaking the solver, or whatever issue you tried to solve in the first place. And what we obtain is an unreliable dependency solver, with the very same action resulting in different predicted packages. But sure, let's agree to disagree. |
Nothing is broken. Absolutely nothing. |
Look, I understand that constantly dealing with crappy users tends to put you on the defensive when dealing with criticism - I've been there before. However, it doesn't mean the dev is always right - and I've myself observed this many times before. Having cases that can't be handled? That's fine, every helper has difficulty in a situation or another. But having cases that produce different results with the same input - while the AUR RPC data doesn't change - is a flaw. There is something to fix here, either by handling the case correctly or by stopping the process with an error message. Regardless of the implemented algorithm, the solver is unreliable. From an user point of view, the question that naturally arises is "When can I trust aurman and when can I not?" Something is certainly broken, yes. |
I've never said that the dev is always right. Anyway: I think that I am right in this case, let me explain in detail what is going on and why I have no intention to change anything. In order to be able to build/install a package, all dependencies of that package need to be fulfilled. There is no such thing as "ordered" dependencies, a dependency is fulfilled or it is not. If there are all dependencies fulfilled, you may build/install, otherwise you may not. The logical mathematical representation for dependencies is thus a set, which does not represent any kind of ordering. In fact, Now back to our problem.
The Leaves us with: "But it is inconsistent", to which the answer is "Yes, but it does not matter unless your package is garbage". I could make it consistent by e.g. ordering all dependencies alphabetically when working with them, but that is complete nonsense. It leads to consistency but without any rational benefit. The correct mathematical representation is a set, changing this just for consistency without any other kind of benefit does not make any sense in my opinion, which is why I am not going to change anything here. By the way: The answer to the question
Always, if aurman finds a solution, it is valid. The inconsistency in finding solutions does not mean, that there are invalid solutions which can be found by aurman mistakenly. |
With due respect, a solver that doesn't succeed when a solution exists, or that finds different solutions to the same input (sometime valid and sometimes not) is the opposite of "reliable" - by definition. I guess we have a very different definition of "reliable solver". I understand what aurman tries to do, but it seems to aims at a tree in an over-engineered way but eventually miss the forest. When I see the simpler algo implemented in the deprecated pacaur actually achieves consistent and good results at the same issue, I can't do anything but roll my eyes. But yes, solving dependencies is indeed a complex problem, and there is much progress to do among helpers here. I'm however not sure how you could claim aurman has a reliable solver - it's clearly not. Maybe because of your design that bring other advantages at the table, but it's inhenrently not reliable. |
I explicitly stated that Anyway: I made my point, unless you provide technical/mathematical arguments on how to solve this in an appropriate way, that's it. You saying: "I do not like it" without any constructive feedback on how to actually do it, does not help anyone. Saying: "It is wrong, fix it" is easy, but if you want to help me, provide useful feedback on how to do it. Everything else is useless |
Anyway: I do not feel like I want to develop this project as of now with feedback via GitHub issues anymore. There are some valid reports like this one, but I am seriously too tired of all the nonsense which I have to discuss. |
Which isn't the problem... Anyway, if you want to look at a reliable solver, check out libsolv from SUSE - they use a satisfiability
Very well - that I can understand. |
@polygamma on the constructive side of things, in case it was an honest question and an answer might be useful. If you want the algo to be deterministic, use a sorted set for example. It's a set, you cannot have duplicates there and checking for existence is O(ln(n)) (not Another alternative is to have a linear queue and an additional set I guess. Use the set to check existence, otherwise add to the linear queue. You don't need to remove deps, so I guess that works too. Most importantly, enjoy your contributions and have fun.:) Don't mean to pressure, just throw in some technical answers to questions mentioned. |
// If you'd ask me, I'd say the implementation looks like a "reliable" solver, but not "deterministic". Without determinism users aren't happy though :shrugs:. |
In the end I wonder what's the point in having a dependency solver that
rivals pacman itself in terms of complexity. (All pacman wrappers I know
of which use pacman -U fall into this trap, eventually).
…On Wed, Aug 21, 2019 at 12:31:41AM -0700, Vasili Novikov wrote:
// If you'd ask me, I'd say the implementation looks like a "reliable" solver, but not "reproducible". Without reproducibility users aren't happy though :shrugs:.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#259 (comment)
|
Description
Running same command to install packages >2 times yields different results:
first run:
Second run:
Third run
So I decided to run with `--deep_search and here what i've got from 2 runs:
and
Expected Behavior
Solution for package dependencies must be same for each run since there is no changes in packages installed between tries.
Version of
aurman
you are usingDistro - Arch
The text was updated successfully, but these errors were encountered: