Solver refactoring#1739
Conversation
7693d1f to
924bdbe
Compare
924bdbe to
cdeeb04
Compare
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
cdeeb04 to
451f4bd
Compare
dd33205 to
b487316
Compare
Fabien-Chouteau
left a comment
There was a problem hiding this comment.
I can't say I fully understand the code but it looks well organized and documented.
I am a bit worried about the dependency on a growing number of very small libraries.
| url = https://github.com/mosteo/dirty_booleans | ||
| [submodule "deps/compare_to_case"] | ||
| path = deps/compare_to_case | ||
| url = https://github.com/mosteo/compare_to_case |
There was a problem hiding this comment.
I am not too fond of having a dependency project with only one function in it.
There was a problem hiding this comment.
I can see the concern. I was operating from the idea of not having in Alire logic unrelated to its function, but what is the minimum reusable code that makes worthwhile moving it into a new crate is certainly debatable.
I will move that function for now into Alire.Utils.
| -- a veeery long time when many crates/releases must be considered. TODO: | ||
| -- All these policies can go away once we move from a recursive solver to | ||
| -- a non-recursive priority-based one. | ||
| -- When looking for releases within a crate, which one to try first. The |
There was a problem hiding this comment.
So what is the strategy for Alire?
There was a problem hiding this comment.
Alire defaults to newest first, unless the global switch --prefer-oldest is used, which affects get, search and show. Notably, alr update (and automatic updates after manual manifest edition) don't honor it, so I've had for a time the idea of moving it to a setting, so the behavior is globally consistent.
c3dade9 to
d12d420
Compare
| Commit : constant String := "unknown"; | ||
| Changes : constant String := "unknown"; | ||
| Commit : constant String := "c3dade93403aaacec59097e450a22ce83e0ceb0f"; | ||
| Changes : constant String := "dirty"; |
There was a problem hiding this comment.
Did you intend to include this?
There was a problem hiding this comment.
No, thanks for the catch!
This reworks the recursive solver we have into an A*-like sequential one. The advantages are: cleaner implementation, better maintainability, no need to start the search several times to find a good incomplete solution (once we find an incomplete one, it will be decent enough and it means no complete one exists), simpler options for usage.
For users there should be no noticeable changes.