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

add timeout parameter and SolverOptions to return early #499

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

wolfv
Copy link
Contributor

@wolfv wolfv commented Jan 29, 2024

This could be very useful for the bots and also for rattler-server.

Copy link
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks super nice to me!

@@ -378,6 +388,15 @@ impl<'a> DependencyProvider<SolverMatchSpec<'a>> for CondaDependencyProvider<'a>

Dependencies::Known(dependencies)
}

fn should_cancel_with_value(&self) -> Option<Box<dyn std::any::Any>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for being slow - why the return type is not Option<Box<dyn CancelReason>> but dyn Any?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's defined like that in the trait (in resolvo) so I think we need to honor that contract and return an Box<Any>

@baszalmstra baszalmstra merged commit 2a618a8 into conda:main Jan 30, 2024
13 checks passed
@wolfv wolfv deleted the add-timeout branch January 30, 2024 08:13
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

Successfully merging this pull request may close these issues.

3 participants