Skip to content
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

What is the logic in the rule sorting? #534

Closed
wolfv opened this issue Jun 29, 2023 · 2 comments
Closed

What is the logic in the rule sorting? #534

wolfv opened this issue Jun 29, 2023 · 2 comments

Comments

@wolfv
Copy link
Contributor

wolfv commented Jun 29, 2023

Hi @mlschroe!

We have been hard at work porting your wonderful library to Rust (for extra memory safety and because it's much easier to read for ourselves).

We have been debugging the remaining differences between libsolv and our port and one difference is the order the rule evaluation.

I was wondering if the unifyrules_sortcmp is supposed to do an optimization for the order of rule evaluation or if it's just to remove duplicates?

We saw that in pubgrub there is an optimization to pick packages with fewest versions first (https://pubgrub-rs-guide.netlify.app/pubgrub_crate/strategy.html).

PS: if you are interested in the port, you can check it out in this PR - conda/rattler#236. It doesn't implement everything that libsolv can do (only what we need for conda packages so far). We are interested in expanding that a bit further though :) Would love to hear from you!

@wolfv wolfv changed the title Is there any logic in the rule sorting? What is the logic in the rule sorting? Jun 29, 2023
@mlschroe
Copy link
Member

It's just used to remove duplicated rules.

@wolfv
Copy link
Contributor Author

wolfv commented Jun 30, 2023

Thanks for the reply! I guess that will make it tricky to get exactly the same results as libsolv in all cases but let's see!

I am closing this issue – have a nice weekend!

@wolfv wolfv closed this as completed Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants