Cargo-edit: providing feedback during "cargo add" operation

Created on 4 Jan 2018  路  5Comments  路  Source: killercup/cargo-edit

Currently, "cargo add " operates without providing any stdout feedback to the user that a crate is added to Cargo.toml. Would you please consider following Cargo convention by providing said feedback?

cargo-add enhancement help wanted

Most helpful comment

Hi there!

I can take a shot at this :smile:

All 5 comments

馃憤 , just like

> cargo build
   Compiling foo v0.1.0 (file:///C:/Users/steve/tmp/splain)

I'd like to see

> cargo add foo
      Adding foo v0.1.0 

unsure if something should go in () after.

Good suggestion, I totally agree. Some notes:

  • [ ] Print Adding {name} {concrete_version} by default
  • [ ] Consider padding this to align with other cargo output (like @steveklabnik did)
  • [ ] Add --quite/-q to suppress this
  • [ ] Append (dev dependency) or (build dependency)

Hi there!

I can take a shot at this :smile:

Great! Go for it!

I just implemented this in #190 . The "cargo-style" coloring and padding looks fine, but is a bit ad-hoc.
There is pub code in cargo that handles this sort of printing, but I don't think adding cargo as a dependency just for this is worth it, as cargo is pretty huge.

I also added a similar message for cargo rm.

Was this page helpful?
0 / 5 - 0 ratings