-
Notifications
You must be signed in to change notification settings - Fork 615
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
Implement --emit-index-annotation
to annotate source index for each package
#2926
Conversation
Nice start! Should we make this opt-in? |
Yeah this should be opt-in. |
280f4bc
to
d7ef99b
Compare
any pointers on which index to use for the test case that uses multiple indices?
|
Can you use |
bahaha thanks for not uploading |
crates/uv-resolver/src/resolution.rs
Outdated
@@ -714,6 +728,14 @@ impl std::fmt::Display for DisplayResolutionGraph<'_> { | |||
// Write the line as is. | |||
writeln!(f, "{line}")?; | |||
} | |||
|
|||
if self.include_indices && node.index().is_some() { |
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.
should this conditional include self.include_annotations
?
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 think it's okay as-is.
crates/uv-resolver/src/resolution.rs
Outdated
@@ -505,6 +506,8 @@ pub struct DisplayResolutionGraph<'a> { | |||
/// Whether to include annotations in the output, to indicate which dependency or dependencies | |||
/// requested each package. | |||
include_annotations: bool, | |||
/// Whether to include indices in the output, to indicate which index was used for each package. | |||
include_indices: bool, |
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 know it's tedious but I'm going to change this to indexes
to match the terminology that pip uses in its documentation.
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.
/shrug i can run through these real quick
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.
Thanks!
6c03a88
to
5c02973
Compare
--emit-index-annotation
to annotate source index for each package
1b8a6c1
to
aa1c841
Compare
Summary
resolves #2852
Test Plan
add a couple of tests:
tested manually as well: