rust-lang / rust-lang/cargo

If you depend on a binary then commands are inconsistent

Open
#8,708 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-crate-dependencies A-diagnostics C-bug S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

For example if you have

[dependencies]
wasm-bindgen-cli = "=0.2.48"

Then cargo tree will list all and cargo vender will download all of wasm-bindgen-cli's depenacys. But cargo metadata will list none, and cargo check will only build some of them. So this is a mess, and clearly needs to be made more consistent.

Previous discussion at: https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Differences.20between.20tree.20and.20metadata.20commands

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the dependency behavior described for cargo tree, cargo vendor, cargo metadata, and cargo check using the wasm-bindgen-cli example. Read the linked Zulip discussion to understand the intended consistency, then verify that the commands agree on binary dependency treatment when the issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.