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

Denser output for duplicate dependency warnings #109

Closed
djc opened this issue Jan 20, 2020 · 2 comments · Fixed by #112
Closed

Denser output for duplicate dependency warnings #109

djc opened this issue Jan 20, 2020 · 2 comments · Fixed by #112
Assignees
Labels
enhancement New feature or request

Comments

@djc
Copy link

djc commented Jan 20, 2020

Is your feature request related to a problem? Please describe.
Especially when getting started, it's hard to read the abundant output from cargo deny. I also find it confusing that there are 3 top-level warnings to describe one "problem".

warning: found 2 duplicate entries for crate 'nom'

    ┌── /Users/djc/src/valuex/Cargo.lock:83:1 ───
    │
 83 │ ╭ nom 4.2.3 registry+https://github.com/rust-lang/crates.io-index
 84 │ │ nom 5.1.0 registry+https://github.com/rust-lang/crates.io-index
    │ ╰───────────────────────────────────────────────────────────────^ lock entries
    │

warning: duplicate #1 (82) nom = 4.2.3

    ┌── /Users/djc/src/valuex/Cargo.lock:83:1 ───
    │
 83 │ nom 4.2.3 registry+https://github.com/rust-lang/crates.io-index
    │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lock entry
    │
    = nom v4.2.3
      └── weedle v0.10.0
          └── wasm-bindgen-webidl v0.2.58
              └── (build) web-sys v0.3.35
                  └── ring v0.16.9
                      └── backend v0.1.0

warning: duplicate #2 (83) nom = 5.1.0

    ┌── /Users/djc/src/valuex/Cargo.lock:84:1 ───
    │
 84 │ nom 5.1.0 registry+https://github.com/rust-lang/crates.io-index
    │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lock entry
    │
    = nom v5.1.0
      └── askama_derive v0.9.0
          └── askama v0.9.0
              └── backend v0.1.0

Describe the solution you'd like
A single warning would, I think, be easier to understand, along the lines of:

warning: found 2 duplicate entries for crate 'nom'

    ┌── /Users/djc/src/valuex/Cargo.lock:83:1 ───
    │
 83 │ ╭ nom 4.2.3 registry+https://github.com/rust-lang/crates.io-index
 84 │ │ nom 5.1.0 registry+https://github.com/rust-lang/crates.io-index
    │ ╰───────────────────────────────────────────────────────────────^ lock entries

    = nom v4.2.3
      └── weedle v0.10.0
          └── wasm-bindgen-webidl v0.2.58
              └── (build) web-sys v0.3.35
                  └── ring v0.16.9
                      └── backend v0.1.0

    = nom v5.1.0
      └── askama_derive v0.9.0
          └── askama v0.9.0
              └── backend v0.1.0
@djc djc added the enhancement New feature or request label Jan 20, 2020
@Jake-Shadle
Copy link
Member

I think this was mainly just a byproduct of how the inverted dependency trees are currently injected, I was planning on doing some cleanup around this today anyways.

@djc
Copy link
Author

djc commented Jan 21, 2020

The new release is awesome! One tiny nit: I would probably still put an empty line between each of the dependency trees, currently they are kinda mashed together

warning: found 2 duplicate entries for crate 'generic-array'

    ┌── /Users/djc/src/valuex/Cargo.lock:47:1 ───
    │
 47 │ ╭ generic-array 0.12.3 registry+https://github.com/rust-lang/crates.io-index
 48 │ │ generic-array 0.13.2 registry+https://github.com/rust-lang/crates.io-index
    │ ╰──────────────────────────────────────────────────────────────────────────^ lock entries
    │
    = generic-array v0.12.3
      ├── block-buffer v0.7.3
      │   └── sha2 v0.8.1
      │       └── postgres-protocol v0.5.0
      │           ├── postgres-types v0.1.0
      │           │   └── tokio-postgres v0.5.1
      │           │       ├── backend v0.1.0
      │           │       └── bb8-postgres v0.4.0
      │           │           └── backend v0.1.0 (*)
      │           └── tokio-postgres v0.5.1 (*)
      ├── crypto-mac v0.7.0
      │   └── hmac v0.7.1
      │       └── postgres-protocol v0.5.0 (*)
      └── digest v0.8.1
          ├── hmac v0.7.1 (*)
          └── sha2 v0.8.1 (*)
    = generic-array v0.13.2 <-- insert empty line here ^^^?
      └── postgres-protocol v0.5.0
          ├── postgres-types v0.1.0
          │   └── tokio-postgres v0.5.1
          │       ├── backend v0.1.0
          │       └── bb8-postgres v0.4.0
          │           └── backend v0.1.0 (*)
          └── tokio-postgres v0.5.1 (*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants