-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Solver refactoring #1739
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
.gitmodules
Outdated
@@ -57,6 +57,9 @@ | |||
[submodule "deps/dirty_booleans"] | |||
path = deps/dirty_booleans | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not too fond of having a dependency project with only one function in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what is the strategy for Alire?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to include this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.