Handle source replacement separately for [dependencies] and [dev-dependencies]
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Describe the problem you are trying to solve
I understand that cargo has a feature to replace dependency source to self-hosted: https://doc.rust-lang.org/cargo/reference/source-replacement.html
However, it seems that I cannot do source replacement of source.crates-io only for [dependencies] but not for [build-dependencies]?
Describe the solution you'd like
Handle source replacement separately like this:
[source.dependencies.crates-io]
replace-with = "my-vendor-source-for-build-deps"
[source.dev-dependencies.crates-io]
replace-with = "my-vendor-source-for-dev-deps"
Notes
This issue has been discussed here: https://users.rust-lang.org/t/source-replacement-for-dependencies-only-but-not-for-build-dependencies/35411
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
Start with Cargo's source replacement documentation and the linked discussion about separating dependency categories. Determine how source replacement currently applies across dependency types; done means configuration can select different replacement sources for dependencies, build-dependencies, and dev-dependencies as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100