-
Notifications
You must be signed in to change notification settings - Fork 183
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
Separate recursive solver #546
Separate recursive solver #546
Conversation
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.
This looks great :)
A few comments. But otherwise, we should also make sure to update the book and double check that publishing chalk-recursive
will be fine. And I would like at least a quick review/okay from another person, since I wrote the first commit. @nikomatsakis?
where | ||
I: Interner, | ||
S: Solver<I>, |
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.
Can we possibly make this use a dyn
trait? I think I'd prefer that to keep the generics under control.
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.
But I'd be happy to consider all that as follow-up work
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'll file an issue for this.
pub enum SolverImpl { | ||
Slg(SLGSolverImpl<ChalkIr>), | ||
Recursive(RecursiveSolverImpl<ChalkIr>), | ||
} |
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.
dyn trait?
I'm good to merge when @jackh726 is |
5cf6876
to
b3233f2
Compare
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
b3233f2
to
a414412
Compare
Oops seems like I need to move some tests around, hence the build failure |
@zaharidichev I fixed it :) Let me do one more quick review then I'll probably merge this. |
This PR builds on top of the work that @jackh726 did in #542 and separates the recursive solver into its own crate that depends on chalk_solve. This is just a WIP to get a sanity check whether it is heading in the right direction.
One of the questions I have is whether we actually want to limit the API surface are of the recursive solver and chalk engine as much as possible or this is not a goal.
Namely, is saying that the only thing that the recursive solver crate needs to export is
RecursiveSolverImpl
?