-
Notifications
You must be signed in to change notification settings - Fork 4
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
Print crate dependencies #15
Conversation
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! Looks good. Much cleaner with the map_err, ?
, and eprintln. 👍
Left a comment about quieter output if you want to do that, otherwise just need to switch to the published crates client version like you mentioned.
Cargo.toml
Outdated
|
||
[[bin]] | ||
name = "cargo-show" | ||
path = "src/main.rs" | ||
|
||
[dependencies] | ||
docopt = "0.8.0" | ||
g-k-crates-io-client = "0.9.0" | ||
# g-k-crates-io-client = "0.9.0" | ||
g-k-crates-io-client = { git = "https://github.com/pravic/g-k-crates-io-client", branch = "update" } |
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.
merged your PR and published 0.16.0: https://crates.io/crates/g-k-crates-io-client/0.16.0 so this can be updated to that version.
// e.g. crate name not found | ||
println_stderr!("Error fetching data for {}: {}", crate_name, e); | ||
// print crate's metadata | ||
println!("{}", meta); |
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.
If you'd rather have quieter output, I'd be OK with just printing just the id or name or both with the dependents instead of the full metadata.
I also need to remember to document how |
I don't know how to combine 2 json responses into one output. May be I mean, As for the brief output.. It is better to make it in another PR I think. |
Also we need to distinguish This?
|
Thanks! This looks good. I opened issues for deciding what to do about the other stuff. |
cc #14
Note that it requires merge and publish of the https://github.com/g-k/g-k-crates-io-client first (and change of Cargo.toml).
This PR introduces a new option named
--dependencies
that prints the crate's dependencies (of the latest version):