Description
Problem
We currently have a number of dependencies for which we pull in different versions of the same crate as dependencies in our cargo tree
have conflicting semver requirements. This causes multiple compilation runs, slows down linking, and causes binary bloat.
This is on top of crates that functionally duplicate the solution to the same problem (e.g. multiple crates responsible for ANSI coloring or wrappers around the system e.g. for libc or windows system calls)
Aims
As a first goal we should strive to reduce this version duplication by taking a hard look at dependencies or semver-specs in our crates that cause them.\nEither we eliminate them, choose better versions on our side (as long as this doesn't preclude important bugfixes), or be good stewards and try to contribute upstream version bumps.
Output of cargo tree -d
This returns dependencies which appear with multiple versions and their dependency tree. Also check the Cargo.lock
(last updated 2024-03-11 with --depth 3
)
arrayvec v0.5.2
└── vte v0.10.1
└── ansitok v0.2.0
├── ansi-str v0.8.0
├── papergrid v0.10.0
└── tabled v0.14.0
arrayvec v0.7.4
├── num-format v0.4.4
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command)
│ │ └── nu v0.91.1 (/home/stefan/nushell)
│ ├── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol)
│ │ ├── nu v0.91.1 (/home/stefan/nushell)
│ │ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli)
│ │ ├── nu-cmd-base v0.91.1 (/home/stefan/nushell/crates/nu-cmd-base)
│ │ ├── nu-cmd-extra v0.91.1 (/home/stefan/nushell/crates/nu-cmd-extra)
│ │ ├── nu-cmd-lang v0.91.1 (/home/stefan/nushell/crates/nu-cmd-lang)
│ │ ├── nu-color-config v0.91.1 (/home/stefan/nushell/crates/nu-color-config)
│ │ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ │ ├── nu-engine v0.91.1 (/home/stefan/nushell/crates/nu-engine)
│ │ ├── nu-explore v0.91.1 (/home/stefan/nushell/crates/nu-explore)
│ │ ├── nu-lsp v0.91.1 (/home/stefan/nushell/crates/nu-lsp)
│ │ ├── nu-parser v0.91.1 (/home/stefan/nushell/crates/nu-parser)
│ │ ├── nu-plugin v0.91.1 (/home/stefan/nushell/crates/nu-plugin)
│ │ ├── nu-std v0.91.1 (/home/stefan/nushell/crates/nu-std)
│ │ └── nu-table v0.91.1 (/home/stefan/nushell/crates/nu-table)
│ ├── nu-test-support v0.91.1 (/home/stefan/nushell/crates/nu-test-support)
│ │ [dev-dependencies]
│ │ └── nu v0.91.1 (/home/stefan/nushell)
│ └── nu-utils v0.91.1 (/home/stefan/nushell/crates/nu-utils)
│ ├── nu v0.91.1 (/home/stefan/nushell)
│ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
│ ├── nu-cmd-extra v0.91.1 (/home/stefan/nushell/crates/nu-cmd-extra) (*)
│ ├── nu-cmd-lang v0.91.1 (/home/stefan/nushell/crates/nu-cmd-lang) (*)
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ ├── nu-engine v0.91.1 (/home/stefan/nushell/crates/nu-engine) (*)
│ ├── nu-explore v0.91.1 (/home/stefan/nushell/crates/nu-explore) (*)
│ ├── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol) (*)
│ ├── nu-table v0.91.1 (/home/stefan/nushell/crates/nu-table) (*)
│ ├── nu-term-grid v0.91.1 (/home/stefan/nushell/crates/nu-term-grid)
│ └── nu-test-support v0.91.1 (/home/stefan/nushell/crates/nu-test-support) (*)
└── rust_decimal v1.33.1
├── byte-unit v5.1.4
│ └── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol) (*)
└── dtparse v2.0.0
└── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
bitflags v1.3.2
├── inotify v0.9.6
│ └── notify v6.1.1
│ └── notify-debouncer-full v0.3.1
├── lsp-types v0.95.0
│ └── nu-lsp v0.91.1 (/home/stefan/nushell/crates/nu-lsp) (*)
└── nix v0.26.4
├── wl-clipboard-rs v0.8.0
│ └── arboard v3.3.0
├── x11rb v0.12.0
│ └── arboard v3.3.0 (*)
└── x11rb-protocol v0.12.0
└── x11rb v0.12.0 (*)
bitflags v2.4.2
├── crossterm v0.27.0
│ ├── nu v0.91.1 (/home/stefan/nushell)
│ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ ├── nu-explore v0.91.1 (/home/stefan/nushell/crates/nu-explore) (*)
│ ├── ratatui v0.26.0
│ │ └── nu-explore v0.91.1 (/home/stefan/nushell/crates/nu-explore) (*)
│ └── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127)
│ ├── nu v0.91.1 (/home/stefan/nushell)
│ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
│ └── nu-lsp v0.91.1 (/home/stefan/nushell/crates/nu-lsp) (*)
├── nix v0.27.1
│ ├── ctrlc v3.4.2
│ │ └── nu v0.91.1 (/home/stefan/nushell)
│ ├── nu v0.91.1 (/home/stefan/nushell)
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ ├── nu-system v0.91.1 (/home/stefan/nushell/crates/nu-system)
│ │ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ │ └── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol) (*)
│ └── uucore v0.0.24
│ ├── uu_cp v0.0.23
│ ├── uu_mkdir v0.0.23
│ ├── uu_mktemp v0.0.23
│ ├── uu_mv v0.0.23
│ └── uu_whoami v0.0.23
├── openssl v0.10.63
│ └── native-tls v0.2.11
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── ureq v2.9.1
├── procfs v0.16.0
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── nu-system v0.91.1 (/home/stefan/nushell/crates/nu-system) (*)
├── procfs-core v0.16.0
│ └── procfs v0.16.0 (*)
├── ratatui v0.26.0 (*)
├── rusqlite v0.31.0
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
├── rustix v0.38.31
│ ├── fd-lock v3.0.13
│ │ └── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
│ ├── procfs v0.16.0 (*)
│ ├── tempfile v3.10.0
│ │ ├── nu-test-support v0.91.1 (/home/stefan/nushell/crates/nu-test-support) (*)
│ │ ├── uu_mktemp v0.0.23 (*)
│ │ └── wl-clipboard-rs v0.8.0 (*)
│ │ [dev-dependencies]
│ │ └── nu v0.91.1 (/home/stefan/nushell)
│ ├── terminal_size v0.3.0
│ │ ├── clap_builder v4.4.18
│ │ ├── miette v7.1.0
│ │ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ │ └── nu-explore v0.91.1 (/home/stefan/nushell/crates/nu-explore) (*)
│ ├── wayland-backend v0.3.3
│ │ ├── wayland-client v0.31.2
│ │ ├── wayland-protocols v0.31.2
│ │ ├── wayland-protocols-wlr v0.2.0
│ │ └── wl-clipboard-rs v0.8.0 (*)
│ ├── wayland-client v0.31.2 (*)
│ ├── which v6.0.0
│ │ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
│ │ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ │ └── nu-test-support v0.91.1 (/home/stefan/nushell/crates/nu-test-support) (*)
│ └── xattr v1.3.1
│ └── uu_cp v0.0.23 (*)
├── wayland-client v0.31.2 (*)
├── wayland-protocols v0.31.2 (*)
└── wayland-protocols-wlr v0.2.0 (*)
itertools v0.11.0
└── wax v0.6.0
└── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
itertools v0.12.0
├── nu-cmd-extra v0.91.1 (/home/stefan/nushell/crates/nu-cmd-extra) (*)
├── nu-cmd-lang v0.91.1 (/home/stefan/nushell/crates/nu-cmd-lang) (*)
├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── nu-parser v0.91.1 (/home/stefan/nushell/crates/nu-parser) (*)
├── ratatui v0.26.0 (*)
└── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
libc v0.2.152
├── backtrace v0.3.69
│ ├── backtrace-ext v0.2.1
│ │ └── miette v7.1.0 (*)
│ └── miette v7.1.0 (*)
├── console v0.15.8
│ ├── dialoguer v0.11.0
│ │ └── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── indicatif v0.17.7
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ ├── uu_cp v0.0.23 (*)
│ └── uu_mv v0.0.23 (*)
├── crossterm v0.27.0 (*)
├── dirs-sys-next v0.1.2
│ └── dirs-next v2.0.0
│ └── nu-path v0.91.1 (/home/stefan/nushell/crates/nu-path)
├── divan v0.1.14
│ [dev-dependencies]
│ └── nu v0.91.1 (/home/stefan/nushell)
├── filetime v0.2.23
│ ├── notify v6.1.1 (*)
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── uu_cp v0.0.23 (*)
├── gethostname v0.3.0
│ └── x11rb v0.12.0 (*)
├── getrandom v0.2.12
│ ├── rand_core v0.6.4
│ │ ├── rand v0.8.5
│ │ └── rand_chacha v0.3.1
│ └── uuid v1.7.0
│ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
│ └── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── inotify v0.9.6 (*)
├── inotify-sys v0.1.5
│ └── inotify v0.9.6 (*)
├── libmimalloc-sys v0.1.35
│ └── mimalloc v0.1.39
│ └── nu v0.91.1 (/home/stefan/nushell)
├── mio v0.8.11
│ ├── crossterm v0.27.0 (*)
│ ├── notify v6.1.1 (*)
│ └── signal-hook-mio v0.2.3
│ └── crossterm v0.27.0 (*)
├── nix v0.26.4 (*)
├── nix v0.27.1 (*)
├── notify v6.1.1 (*)
├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── nu-system v0.91.1 (/home/stefan/nushell/crates/nu-system) (*)
├── open v5.1.1
│ └── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── openssl v0.10.63 (*)
├── openssl-sys v0.9.99
│ ├── native-tls v0.2.11 (*)
│ └── openssl v0.10.63 (*)
├── os_pipe v1.1.5
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── wl-clipboard-rs v0.8.0 (*)
├── parking_lot_core v0.9.9
│ ├── dashmap v5.5.3
│ │ └── serial_test v3.0.0
│ │ [dev-dependencies]
│ └── parking_lot v0.12.1
│ ├── arboard v3.3.0 (*)
│ ├── crossterm v0.27.0 (*)
│ ├── notify-debouncer-full v0.3.1 (*)
│ └── serial_test v3.0.0 (*)
├── pwd v1.4.0
│ └── nu-path v0.91.1 (/home/stefan/nushell/crates/nu-path) (*)
├── rand v0.8.5 (*)
├── signal-hook v0.3.17
│ ├── crossterm v0.27.0 (*)
│ └── signal-hook-mio v0.2.3 (*)
├── signal-hook-mio v0.2.3 (*)
├── signal-hook-registry v1.4.1
│ └── signal-hook v0.3.17 (*)
├── sysinfo v0.30.5
│ ├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ └── nu-system v0.91.1 (/home/stefan/nushell/crates/nu-system) (*)
├── time v0.3.31
│ ├── nu v0.91.1 (/home/stefan/nushell)
│ └── simplelog v0.12.1
│ └── nu v0.91.1 (/home/stefan/nushell)
├── trash v3.3.1
│ └── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── uu_cp v0.0.23 (*)
├── uu_whoami v0.0.23 (*)
├── uucore v0.0.24 (*)
├── wait-timeout v0.2.0
│ └── assert_cmd v2.0.13
│ [dev-dependencies]
│ └── nu v0.91.1 (/home/stefan/nushell)
└── wl-clipboard-rs v0.8.0 (*)
libc v0.2.152
├── cc v1.0.83
│ [build-dependencies]
│ ├── backtrace v0.3.69 (*)
│ ├── libmimalloc-sys v0.1.35 (*)
│ ├── libsqlite3-sys v0.28.0
│ │ └── rusqlite v0.31.0 (*)
│ ├── openssl-sys v0.9.99 (*)
│ └── wayland-backend v0.3.3 (*)
└── time v0.3.31
└── shadow-rs v0.26.1
└── nu-cmd-lang v0.91.1 (/home/stefan/nushell/crates/nu-cmd-lang) (*)
[build-dependencies]
└── nu-cmd-lang v0.91.1 (/home/stefan/nushell/crates/nu-cmd-lang) (*)
nix v0.26.4 (*)
nix v0.27.1 (*)
quick-xml v0.31.0
└── wayland-scanner v0.31.1 (proc-macro)
├── wayland-client v0.31.2 (*)
├── wayland-protocols v0.31.2 (*)
└── wayland-protocols-wlr v0.2.0 (*)
quick-xml v0.31.0
├── calamine v0.24.0
│ └── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
└── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
rand v0.8.5 (*)
rand v0.8.5
└── phf_generator v0.11.2
└── phf_codegen v0.11.2
└── chrono-tz-build v0.2.1
[build-dependencies]
rand_core v0.6.4
└── rand v0.8.5 (*)
rand_core v0.6.4 (*)
regex-automata v0.4.5
├── bstr v1.9.0
│ └── assert_cmd v2.0.13 (*)
└── fancy-regex v0.13.0
├── nu-cli v0.91.1 (/home/stefan/nushell/crates/nu-cli) (*)
├── nu-cmd-extra v0.91.1 (/home/stefan/nushell/crates/nu-cmd-extra) (*)
├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol) (*)
└── nu-table v0.91.1 (/home/stefan/nushell/crates/nu-table) (*)
regex-automata v0.4.5
└── regex v1.10.3
├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
├── parse-zoneinfo v0.3.0
│ └── chrono-tz-build v0.2.1 (*)
├── rstest_macros v0.18.2 (proc-macro)
│ └── rstest v0.18.2
│ [dev-dependencies]
├── titlecase v2.2.1
│ └── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
└── wax v0.6.0 (*)
syn v1.0.109
├── derive-new v0.5.9 (proc-macro)
│ └── wl-clipboard-rs v0.8.0 (*)
└── stability v0.1.1 (proc-macro)
└── ratatui v0.26.0 (*)
syn v2.0.48
├── divan-macros v0.1.14 (proc-macro)
│ └── divan v0.1.14 (*)
├── miette-derive v7.1.0 (proc-macro)
│ └── miette v7.1.0 (*)
├── openssl-macros v0.1.1 (proc-macro)
│ └── openssl v0.10.63 (*)
├── pest_generator v2.7.6
│ └── pest_derive v2.7.6 (proc-macro)
│ └── human-date-parser v0.1.1
├── rstest_macros v0.18.2 (proc-macro) (*)
├── rust-embed-impl v8.2.0 (proc-macro)
│ └── rust-embed v8.2.0
│ └── nu-cmd-extra v0.91.1 (/home/stefan/nushell/crates/nu-cmd-extra) (*)
├── serde_derive v1.0.196 (proc-macro)
│ └── serde v1.0.196
│ ├── bincode v1.3.3
│ ├── bitflags v2.4.2 (*)
│ ├── byte-unit v5.1.4 (*)
│ ├── calamine v0.24.0 (*)
│ ├── chrono v0.4.35
│ ├── crossterm v0.27.0 (*)
│ ├── csv v1.3.0
│ ├── erased-serde v0.4.2
│ ├── linked-hash-map v0.5.6
│ ├── lsp-server v0.7.6
│ ├── lsp-types v0.95.0 (*)
│ ├── nu-cmd-extra v0.91.1 (/home/stefan/nushell/crates/nu-cmd-extra) (*)
│ ├── nu-color-config v0.91.1 (/home/stefan/nushell/crates/nu-color-config) (*)
│ ├── nu-command v0.91.1 (/home/stefan/nushell/crates/nu-command) (*)
│ ├── nu-json v0.91.1 (/home/stefan/nushell/crates/nu-json)
│ ├── nu-lsp v0.91.1 (/home/stefan/nushell/crates/nu-lsp) (*)
│ ├── nu-plugin v0.91.1 (/home/stefan/nushell/crates/nu-plugin) (*)
│ ├── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol) (*)
│ ├── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
│ ├── rmp-serde v1.1.2
│ ├── serde_json v1.0.112
│ ├── serde_spanned v0.6.5
│ ├── serde_urlencoded v0.7.1
│ ├── serde_yaml v0.9.30
│ ├── toml v0.8.8
│ ├── toml_datetime v0.6.5
│ ├── toml_edit v0.21.0
│ ├── typetag v0.2.15
│ ├── ureq v2.9.1 (*)
│ └── url v2.5.0
├── serde_repr v0.1.18 (proc-macro)
│ └── lsp-types v0.95.0 (*)
├── serial_test_derive v3.0.0 (proc-macro)
│ └── serial_test v3.0.0 (*)
├── strum_macros v0.26.1 (proc-macro)
│ ├── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
│ └── strum v0.26.1
│ ├── ratatui v0.26.0 (*)
│ └── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
├── thiserror-impl v1.0.56 (proc-macro)
│ └── thiserror v1.0.56
│ ├── arboard v3.3.0 (*)
│ ├── dialoguer v0.11.0 (*)
│ ├── human-date-parser v0.1.1 (*)
│ ├── miette v7.1.0 (*)
│ ├── nu-protocol v0.91.1 (/home/stefan/nushell/crates/nu-protocol) (*)
│ ├── pest v2.7.6
│ ├── pwd v1.4.0 (*)
│ ├── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)
│ ├── umask v2.1.0
│ ├── wax v0.6.0 (*)
│ └── wl-clipboard-rs v0.8.0 (*)
└── typetag-impl v0.2.15 (proc-macro)
└── typetag v0.2.15 (*)
time v0.3.31 (*)
time v0.3.31 (*)
vte v0.10.1 (*)
vte v0.11.1
└── strip-ansi-escapes v0.2.0
├── nu-explore v0.91.1 (/home/stefan/nushell/crates/nu-explore) (*)
├── nu-utils v0.91.1 (/home/stefan/nushell/crates/nu-utils) (*)
└── reedline v0.30.0 (https://github.com/nushell/reedline?branch=main#06987127) (*)