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

Update the docs for prioritize #312

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Conversation

konstin
Copy link
Member

@konstin konstin commented Jan 24, 2025

I've written the docs with focus on a new user that implements a dependency provider for the first time rather than with a focus on exact definitions.

I've written the docs with focus on a new user that implements a dependency provider for the first time rather than with a focus on exact definitions.
@konstin konstin requested a review from Eh2406 January 24, 2025 21:02
src/solver.rs Outdated
/// Decisions are always made for the highest priority package first. The order of decisions
/// determines which solution is chosen and can drastically change the performances of the
/// solver. If there is a conflict between two package versions, the package with the higher
/// priority is preserved and the lower priority gets discarded. Usually, you want to decide
Copy link
Member

Choose a reason for hiding this comment

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

If there is a conflict between two package versions, the priority is preserved and the lower priority gets discarded.

I'm not following. What scenario are you trying to describe?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the word "decision".

Say:
choose A
decide A 2
choose B
decide B 2

and then we discover A 2 -> C 1, B 2 -> C 2.

In this case, we will next try B 1, not A 1: The version of A 2 gets preserved, while B 2 gets discarded.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps: "If there is a conflict between two package versions, decisions will be backtracked until the lower priority package version is discarded preserving the higher priority package." or something.

@Eh2406 Eh2406 requested a review from mpizenberg January 28, 2025 20:10
Copy link
Member

@Eh2406 Eh2406 left a comment

Choose a reason for hiding this comment

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

Looks good to me, but @mpizenberg is our master wordsmith.

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.

It’s fine by me

@konstin konstin added this pull request to the merge queue Jan 29, 2025
Merged via the queue into dev with commit 0af520f Jan 29, 2025
7 checks passed
@konstin konstin deleted the konsti/dev/update-prioritize-docs branch January 29, 2025 16:49
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