LukeMathWalker / LukeMathWalker/cargo-chef
Local crate transitively used doesn't get patched
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
Consider a workspace with the following structure:
```
- Local crate 1, depends on external dependencies
- Local crate 2, depends on external dependencies + local crate 1
```
... where the external dependencies also depend on `crate 1`.
What happens is that we won't be able to make changes to `crate 1` since the following will happen:
- Version of `crate 1` is set to `0.0.1` (https://github.com/LukeMathWalker/cargo-chef/blob/main/src/skeleton/version_masking.rs#L22)
- Patch added for that
- `crate 2` depends on `whatever` which depends on `crate 1 0.4.0` so won't get patched
- `crate 2` will have 2 versions of `crate 1`: the local `0.0.1` and the remote older `0.4.0`
Is there a way to work around this that I might be missing?
Contributor guide
No contributing guide indexed for this repository
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 src/skeleton/version_masking.rs at the version-masking logic, then reproduce the described workspace with local crate 1, local crate 2, and external dependencies that also depend on crate 1. Determine whether the generated patch can cover the transitive dependency and capture the resulting behavior or workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100