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

Single --verbose is ignored, only --verbose --verbose works #867

Open
ArekPiekarz opened this issue Jul 30, 2023 · 3 comments
Open

Single --verbose is ignored, only --verbose --verbose works #867

ArekPiekarz opened this issue Jul 30, 2023 · 3 comments

Comments

@ArekPiekarz
Copy link

Running cargo upgrade with --verbose flag produces the same content as without it. Only adding a second flag to create --verbose --verbose makes a difference.

I'm using cargo-edit-upgrade 0.12.0.

Steps to reproduce

  1. Clone https://github.com/ArekPiekarz/rusty-tax-break
  2. Checkout commit aade9dbd4701dcbc3c7a656e4d19ad1d8adb2b5c
  3. Run cargo upgrade -i --recursive:
$ cargo upgrade -i --recursive
    Updating 'https://github.com/rust-lang/crates.io-index' index
    Checking rusty-tax-break's dependencies
name     old req compatible latest  new req
====     ======= ========== ======  =======
dirs     4.0.0   4.0.0      5.0.1   5.0.1  
git2     0.16.1  0.16.1     0.17.2  0.17.2 
gtk      0.17.0  0.17.1     0.17.1  0.17.1 
serde    1.0.152 1.0.178    1.0.178 1.0.178
time     0.3.17  0.3.23     0.3.23  0.3.23 
toml     0.7.2   0.7.6      0.7.6   0.7.6  
zip      0.6.4   0.6.6      0.6.6   0.6.6  
tempfile 3.3.0   3.7.0      3.7.0   3.7.0  
time     0.3.17  0.3.23     0.3.23  0.3.23 
   Upgrading recursive dependencies
    Updating anyhow v1.0.69 -> v1.0.72
    Updating atk v0.17.0 -> v0.17.1
    Updating cairo-rs v0.17.0 -> v0.17.10
    Updating cairo-sys-rs v0.17.0 -> v0.17.10
    Updating cfg-expr v0.11.0 -> v0.15.4
    Updating crossbeam-utils v0.8.14 -> v0.8.16
    Updating field-offset v0.3.4 -> v0.3.6
    Updating flate2 v1.0.25 -> v1.0.26
    Updating form_urlencoded v1.1.0 -> v1.2.0
    Updating futures-channel v0.3.26 -> v0.3.28
    Updating futures-core v0.3.26 -> v0.3.28
    Updating futures-executor v0.3.26 -> v0.3.28
    Updating futures-io v0.3.26 -> v0.3.28
    Updating futures-macro v0.3.26 -> v0.3.28
    Updating futures-task v0.3.26 -> v0.3.28
    Updating futures-util v0.3.26 -> v0.3.28
    Updating gdk v0.17.0 -> v0.17.1
    Updating gdk-pixbuf v0.17.0 -> v0.17.10
    Updating gdk-pixbuf-sys v0.17.0 -> v0.17.10
    Updating getrandom v0.2.8 -> v0.2.10
    Updating gio v0.17.0 -> v0.17.10
    Updating gio-sys v0.17.0 -> v0.17.10
    Updating glib v0.17.1 -> v0.17.10
    Updating glib-macros v0.17.1 -> v0.17.10
    Updating glib-sys v0.17.0 -> v0.17.10
    Updating gobject-sys v0.17.0 -> v0.17.10
    Updating gtk3-macros v0.17.0 -> v0.17.1
    Removing hashbrown v0.12.3
    Updating idna v0.3.0 -> v0.4.0
    Removing indexmap v1.9.2
    Updating itoa v1.0.5 -> v1.0.9
    Updating jobserver v0.1.25 -> v0.1.26
    Updating libz-sys v1.1.8 -> v1.1.12
    Updating log v0.4.17 -> v0.4.19
    Updating memoffset v0.6.5 -> v0.9.0
      Adding miniz_oxide v0.7.1
    Removing nom8 v0.2.0
    Updating once_cell v1.17.1 -> v1.18.0
    Updating pango v0.17.0 -> v0.17.10
    Updating pango-sys v0.17.0 -> v0.17.10
    Updating percent-encoding v2.2.0 -> v2.3.0
    Removing pest v2.5.5
    Updating pin-project-lite v0.2.9 -> v0.2.10
    Updating pkg-config v0.3.26 -> v0.3.27
    Updating proc-macro-crate v1.3.0 -> v1.3.1
    Updating rustc_version v0.3.3 -> v0.4.0
    Updating semver v0.11.0 -> v1.0.18
    Removing semver-parser v0.10.2
    Updating slab v0.4.7 -> v0.4.8
    Updating smallvec v1.10.0 -> v1.11.0
    Updating syn v1.0.107 -> v1.0.109
    Updating system-deps v6.0.3 -> v6.1.1
      Adding target-lexicon v0.12.10
    Updating thiserror v1.0.38 -> v1.0.44
    Updating thiserror-impl v1.0.38 -> v1.0.44
    Removing toml v0.5.11
    Removing toml_datetime v0.5.1
    Removing toml_edit v0.18.1
    Removing ucd-trie v0.1.5
    Updating unicode-bidi v0.3.10 -> v0.3.13
    Updating unicode-ident v1.0.6 -> v1.0.11
    Updating url v2.3.1 -> v2.4.0
note: Re-run with `--verbose` to show more dependencies
  latest: 7 packages

It suggest to add --verbose flag, so let's do it.
4. Run git restore Cargo.lock Cargo.toml
5. Run cargo upgrade -i --recursive --verbose:

$ cargo upgrade -i --recursive --verbose
    Updating 'https://github.com/rust-lang/crates.io-index' index
    Checking rusty-tax-break's dependencies
name     old req compatible latest  new req
====     ======= ========== ======  =======
dirs     4.0.0   4.0.0      5.0.1   5.0.1  
git2     0.16.1  0.16.1     0.17.2  0.17.2 
gtk      0.17.0  0.17.1     0.17.1  0.17.1 
serde    1.0.152 1.0.178    1.0.178 1.0.178
time     0.3.17  0.3.23     0.3.23  0.3.23 
toml     0.7.2   0.7.6      0.7.6   0.7.6  
zip      0.6.4   0.6.6      0.6.6   0.6.6  
tempfile 3.3.0   3.7.0      3.7.0   3.7.0  
time     0.3.17  0.3.23     0.3.23  0.3.23 
   Upgrading recursive dependencies
    Updating anyhow v1.0.69 -> v1.0.72
    Updating atk v0.17.0 -> v0.17.1
    Updating cairo-rs v0.17.0 -> v0.17.10
    Updating cairo-sys-rs v0.17.0 -> v0.17.10
    Updating cfg-expr v0.11.0 -> v0.15.4
    Updating crossbeam-utils v0.8.14 -> v0.8.16
    Updating field-offset v0.3.4 -> v0.3.6
    Updating flate2 v1.0.25 -> v1.0.26
    Updating form_urlencoded v1.1.0 -> v1.2.0
    Updating futures-channel v0.3.26 -> v0.3.28
    Updating futures-core v0.3.26 -> v0.3.28
    Updating futures-executor v0.3.26 -> v0.3.28
    Updating futures-io v0.3.26 -> v0.3.28
    Updating futures-macro v0.3.26 -> v0.3.28
    Updating futures-task v0.3.26 -> v0.3.28
    Updating futures-util v0.3.26 -> v0.3.28
    Updating gdk v0.17.0 -> v0.17.1
    Updating gdk-pixbuf v0.17.0 -> v0.17.10
    Updating gdk-pixbuf-sys v0.17.0 -> v0.17.10
    Updating getrandom v0.2.8 -> v0.2.10
    Updating gio v0.17.0 -> v0.17.10
    Updating gio-sys v0.17.0 -> v0.17.10
    Updating glib v0.17.1 -> v0.17.10
    Updating glib-macros v0.17.1 -> v0.17.10
    Updating glib-sys v0.17.0 -> v0.17.10
    Updating gobject-sys v0.17.0 -> v0.17.10
    Updating gtk3-macros v0.17.0 -> v0.17.1
    Removing hashbrown v0.12.3
    Updating idna v0.3.0 -> v0.4.0
    Removing indexmap v1.9.2
    Updating itoa v1.0.5 -> v1.0.9
    Updating jobserver v0.1.25 -> v0.1.26
    Updating libz-sys v1.1.8 -> v1.1.12
    Updating log v0.4.17 -> v0.4.19
    Updating memoffset v0.6.5 -> v0.9.0
      Adding miniz_oxide v0.7.1
    Removing nom8 v0.2.0
    Updating once_cell v1.17.1 -> v1.18.0
    Updating pango v0.17.0 -> v0.17.10
    Updating pango-sys v0.17.0 -> v0.17.10
    Updating percent-encoding v2.2.0 -> v2.3.0
    Removing pest v2.5.5
    Updating pin-project-lite v0.2.9 -> v0.2.10
    Updating pkg-config v0.3.26 -> v0.3.27
    Updating proc-macro-crate v1.3.0 -> v1.3.1
    Updating rustc_version v0.3.3 -> v0.4.0
    Updating semver v0.11.0 -> v1.0.18
    Removing semver-parser v0.10.2
    Updating slab v0.4.7 -> v0.4.8
    Updating smallvec v1.10.0 -> v1.11.0
    Updating syn v1.0.107 -> v1.0.109
    Updating system-deps v6.0.3 -> v6.1.1
      Adding target-lexicon v0.12.10
    Updating thiserror v1.0.38 -> v1.0.44
    Updating thiserror-impl v1.0.38 -> v1.0.44
    Removing toml v0.5.11
    Removing toml_datetime v0.5.1
    Removing toml_edit v0.18.1
    Removing ucd-trie v0.1.5
    Updating unicode-bidi v0.3.10 -> v0.3.13
    Updating unicode-ident v1.0.6 -> v1.0.11
    Updating url v2.3.1 -> v2.4.0
note: Re-run with `--verbose` to show more dependencies
  latest: 7 packages

As you can see, there is no difference in output - the --verbose flag has been ignored.

  1. Run git restore Cargo.lock Cargo.toml
  2. Add a second --verbose flag:
$ cargo upgrade -i --recursive --verbose --verbose
    Updating 'https://github.com/rust-lang/crates.io-index' index
    Checking rusty-tax-break's dependencies
name              old req compatible latest  new req
====              ======= ========== ======  =======
dirs              4.0.0   4.0.0      5.0.1   5.0.1  
git2              0.16.1  0.16.1     0.17.2  0.17.2 
gtk               0.17.0  0.17.1     0.17.1  0.17.1 
sanitize-filename 0.4.0   0.4.0      0.4.0   0.4.0  
serde             1.0.152 1.0.178    1.0.178 1.0.178
time              0.3.17  0.3.23     0.3.23  0.3.23 
to_trait          0.1.1   0.1.1      0.1.1   0.1.1  
toml              0.7.2   0.7.6      0.7.6   0.7.6  
tz-rs             0.6.14  0.6.14     0.6.14  0.6.14 
zip               0.6.4   0.6.6      0.6.6   0.6.6  
color-backtrace   0.5.1   0.5.1      0.6.0   0.6.0  
gtk-test          0.17.0  0.17.0     0.17.0  0.17.0 
rusty-fork        0.3.0   0.3.0      0.3.0   0.3.0  
tempfile          3.3.0   3.7.0      3.7.0   3.7.0  
termcolor         1.2.0   1.2.0      1.2.0   1.2.0  
time              0.3.17  0.3.23     0.3.23  0.3.23 
   Upgrading recursive dependencies
    Updating addr2line v0.19.0 -> v0.20.0
    Updating anyhow v1.0.69 -> v1.0.72
    Updating atk v0.17.0 -> v0.17.1
    Updating backtrace v0.3.67 -> v0.3.68
    Updating cairo-rs v0.17.0 -> v0.17.10
    Updating cairo-sys-rs v0.17.0 -> v0.17.10
    Updating cfg-expr v0.11.0 -> v0.15.4
    Updating crossbeam-utils v0.8.14 -> v0.8.16
    Updating field-offset v0.3.4 -> v0.3.6
    Updating flate2 v1.0.25 -> v1.0.26
    Updating form_urlencoded v1.1.0 -> v1.2.0
    Updating futures-channel v0.3.26 -> v0.3.28
    Updating futures-core v0.3.26 -> v0.3.28
    Updating futures-executor v0.3.26 -> v0.3.28
    Updating futures-io v0.3.26 -> v0.3.28
    Updating futures-macro v0.3.26 -> v0.3.28
    Updating futures-task v0.3.26 -> v0.3.28
    Updating futures-util v0.3.26 -> v0.3.28
    Updating gdk v0.17.0 -> v0.17.1
    Updating gdk-pixbuf v0.17.0 -> v0.17.10
    Updating gdk-pixbuf-sys v0.17.0 -> v0.17.10
    Updating getrandom v0.2.8 -> v0.2.10
    Updating gimli v0.27.1 -> v0.27.3
    Updating gio v0.17.0 -> v0.17.10
    Updating gio-sys v0.17.0 -> v0.17.10
    Updating glib v0.17.1 -> v0.17.10
    Updating glib-macros v0.17.1 -> v0.17.10
    Updating glib-sys v0.17.0 -> v0.17.10
    Updating gobject-sys v0.17.0 -> v0.17.10
    Updating gtk3-macros v0.17.0 -> v0.17.1
    Removing hashbrown v0.12.3
    Updating idna v0.3.0 -> v0.4.0
    Removing indexmap v1.9.2
    Updating itoa v1.0.5 -> v1.0.9
    Updating jobserver v0.1.25 -> v0.1.26
    Updating libz-sys v1.1.8 -> v1.1.12
    Updating log v0.4.17 -> v0.4.19
    Updating memoffset v0.6.5 -> v0.9.0
    Updating miniz_oxide v0.6.2 -> v0.7.1
    Removing nom8 v0.2.0
    Updating object v0.30.3 -> v0.31.1
    Updating once_cell v1.17.1 -> v1.18.0
    Updating pango v0.17.0 -> v0.17.10
    Updating pango-sys v0.17.0 -> v0.17.10
    Updating percent-encoding v2.2.0 -> v2.3.0
    Removing pest v2.5.5
    Updating pin-project-lite v0.2.9 -> v0.2.10
    Updating pkg-config v0.3.26 -> v0.3.27
    Updating proc-macro-crate v1.3.0 -> v1.3.1
    Updating rustc-demangle v0.1.21 -> v0.1.23
    Updating rustc_version v0.3.3 -> v0.4.0
    Updating semver v0.11.0 -> v1.0.18
    Removing semver-parser v0.10.2
    Updating slab v0.4.7 -> v0.4.8
    Updating smallvec v1.10.0 -> v1.11.0
    Updating syn v1.0.107 -> v1.0.109
    Updating system-deps v6.0.3 -> v6.1.1
      Adding target-lexicon v0.12.10
    Updating thiserror v1.0.38 -> v1.0.44
    Updating thiserror-impl v1.0.38 -> v1.0.44
    Removing toml v0.5.11
    Removing toml_datetime v0.5.1
    Removing toml_edit v0.18.1
    Removing ucd-trie v0.1.5
    Updating unicode-bidi v0.3.10 -> v0.3.13
    Updating unicode-ident v1.0.6 -> v1.0.11
    Updating url v2.3.1 -> v2.4.0

Only now the verbosity has increased.

@epage
Copy link
Collaborator

epage commented Jul 31, 2023

This was changed in #851

  • Before:
    • Show "interesting" dependencies by default
    • --verbose to show all
  • After
    • Show upgraded dependencies by default
    • --verbose to show upgradeable dependencies
    • --verbose --verbose to show all dependencies

Based on feedback about how noisy the output way. I punted on the bookkeeping for deciding what flag to show by just vaguely changing it to say "add --verbose to show more dependencies". This is definitely something that would be good to improve to short-circuit and say --verbose --verbose when its relevant.

@JenChampagne
Copy link

JenChampagne commented Sep 1, 2024

For what it's worth, I never clued into needing to write --verbose twice. When I saw the note saying to use --verbose when I already was using it made me assume the feature was simply broken.

note: Re-run with --verbose to show more dependencies

I don't mind that this behaviour exists now that I'm aware of it, but the messaging could be improved to make it clear.

@oold
Copy link

oold commented Oct 25, 2024

This behavior is very confusing. If it wasn't for the explanation in the issue description here, I still wouldn't know how to make cargo-edit produce the table of dependency versions. It literally tells me to use --verbose, presumably once, because why would I add it twice, and tells me the same thing again with added --verbose flag.

Suggestion:
Change note to say:

note: Re-run with `--verbose` to show more dependencies, re-run with second `--verbose` to show all dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants