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

Log origin of version selection #5186

Merged
merged 2 commits into from
Jul 19, 2024
Merged

Log origin of version selection #5186

merged 2 commits into from
Jul 19, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Jul 18, 2024

Log whether a version was picked because it was the next version or because it was a preference (installed, lockfile or sibling fork)

@konstin konstin added the tracing Verbose output and debugging label Jul 18, 2024
@@ -426,14 +428,22 @@ pub(crate) struct Candidate<'a> {
version: &'a Version,
/// The distributions to use for resolving and installing the package.
dist: CandidateDist<'a>,
/// Whether this candidate was selected from a preference.
preference: bool,
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this an enum?

);
if candidate.preference() {
debug!(
"Selecting: {}=={} (preference, {})",
Copy link
Member

Choose a reason for hiding this comment

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

Maybe [preference] ({}) so that the filename and preference are separate?

Log whether a version was picked because it was the next version or because it was a preference (installed, lockfile or sibling fork)
@konstin konstin force-pushed the konsti/log-preferences branch from 403b7a6 to ccf00a1 Compare July 19, 2024 07:54
@konstin konstin enabled auto-merge (squash) July 19, 2024 08:08
@konstin konstin merged commit 93ba676 into main Jul 19, 2024
54 checks passed
@konstin konstin deleted the konsti/log-preferences branch July 19, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracing Verbose output and debugging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants