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

Rename dependencies type to available and unavailable #216

Merged

Conversation

konstin
Copy link
Member

@konstin konstin commented May 2, 2024

In uv, dependencies are either available or unavailable. They are not unknown, but rather missing due to some brokenness: We're offline but the dep is not cached, the version list failed to deserialize, etc. (https://github.com/astral-sh/uv/blob/0b84eb01408eb0e90b5720b027359aac10708665/crates/uv-resolver/src/resolver/mod.rs#L945-L996). This change is a rename of the variants of Dependencies to reflect that, upstreaming the change from uv.

In uv, dependencies are either available or unavailable. They are not unknown, but rather missing due to some brokenness: We're offline but the dep is not cached, the version list failed to deserialize, etc. (https://github.com/astral-sh/uv/blob/0b84eb01408eb0e90b5720b027359aac10708665/crates/uv-resolver/src/resolver/mod.rs#L945-L996). This change is a rename of the variants of `Dependencies` to reflect that, upstreaming the change from uv.
@konstin konstin added the enhancement New feature or request label May 2, 2024
@@ -121,7 +121,6 @@
//!
//! The third method [get_dependencies](crate::solver::DependencyProvider::get_dependencies)
//! aims at retrieving the dependencies of a given package at a given version.
//! Returns [None] if dependencies are unknown.
Copy link
Member Author

Choose a reason for hiding this comment

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

It returns Result<Dependencies<DP::P, DP::VS, DP::M>, DP::Err>, not an option.

@Eh2406 Eh2406 requested a review from mpizenberg May 2, 2024 15:53
@Eh2406
Copy link
Member

Eh2406 commented May 2, 2024

Seams good to me but @mpizenberg is the naming wizard.

Copy link
Member

@mpizenberg mpizenberg left a comment

Choose a reason for hiding this comment

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

Thanks for the propose change @konstin
I also like it

@Eh2406 Eh2406 added this pull request to the merge queue May 7, 2024
Merged via the queue into pubgrub-rs:dev with commit fce8e02 May 7, 2024
5 checks passed
@konstin konstin deleted the konsti/dev/rename-dependencies-variant branch May 8, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants