-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: allow inspect local workspace packages #66
Conversation
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
tests/testsuite/cargo_information/within_ws_and_pick_ws_package/stdout.log
Outdated
Show resolved
Hide resolved
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
a43f067
to
20ffd0e
Compare
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.
🔢 Self-check
tests/testsuite/cargo_information/within_ws_and_pick_ws_package/stdout.log
Outdated
Show resolved
Hide resolved
1817ea6
to
3e11ca1
Compare
src/ops/info.rs
Outdated
// Only suggest cargo tree command when the package is not a workspace member. | ||
// For workspace members, `cargo tree --package <SPEC> --invert` is useless. It only prints itself. | ||
let suggest_cargo_tree_command = | ||
ws_inspect_info.package_id.is_some() && !ws_inspect_info.is_member; | ||
let add_is_member_note = ws_inspect_info.is_member; |
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.
Maybe we should generalize this on the PackageId's SourceId's SourceKind.
- If from default registry, do nothing
- If from non-default registry, specify that
- If from git or path, say so
We likely don't care about the level of detail of whether it is a workspace member or not.
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.
Sounds make sense. Thanks!
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.
b94cdbc
to
4a2ac07
Compare
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
4a2ac07
to
50cf653
Compare
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.
🔢 Self-check
(Some(latest), false) if latest.version() != package_id.version() => { | ||
write!( | ||
stdout, | ||
" {warn}(latest {} {note}from {}{warn}){reset}", |
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 am not sure if this is a good color choice. Do you have any thoughts?
@@ -1,4 +1,4 @@ | |||
my-package | |||
version: 0.4.1+my-package (latest 99999.0.0+my-package) | |||
version: 0.4.1+my-package (latest 99999.0.0+my-package from registry `dummy-registry`) |
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.
The latest version and source URL.
@@ -0,0 +1,6 @@ | |||
cargo-list-test-fixture | |||
version: 0.2.0 (from [ROOT]/case) |
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.
The path URL.
@epage I am going to move forward and merge it. If you have any other comments we can improve it later. I want to merge it to avoid conflicts when making some improvements to the MSRV stuff. |
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.
🔢 Self-check
The panic occurred while creating the API registry. Simply disregard the error.
close #60