Cargo-installing a binary within a workspace shows warnings about profile overrides
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Situation:
- A workspace is composed of two packages:
aandb. bdepends on the cratesmallvec.- The workspace has a section mentioning
[profile.dev.package] smallvec = { opt-level = 3 }.
When running cargo install --path ./a, I'm getting a warning:
warning: profile package spec `smallvec` in profile `dev` did not match any packages
This warning is printed as the package a doesn't depend on smallvec.
Running cargo install --path ./b works fine.
I believe that this is an issue with Cargo, as I don't think that there's a clean way to silence this warning.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the workspace with packages a and b, the smallvec dependency, and the [profile.dev.package] override, then compare cargo install --path ./a with ./b. Trace how profile package specs are matched during installation; done means the irrelevant smallvec override no longer emits a warning when installing a, while the relevant case remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100