cargo-chef
cargo-chef copied to clipboard
Feature request: `cargo-chef` support for patches
Howdy! I work in a medium-large workspace that includes patches to a couple of dependencies (can provide a minimal example if that would be helpful). When trying to use cargo chef cook, it doesn't seem like the patches are included or applied---I'm seeing compilation errors.
Would it be possible to add rust-patches support to cargo-chef?
I think the only thing that is necessary is adding --offline support to the cargo command that is run, which I've attempted to do in https://github.com/LukeMathWalker/cargo-chef/pull/65
I am still running into problems even with --offline support. I think it's because cargo chef is overwriting the rust-patches' lib.rs files. These should still be treated as dependencies---they should not be overwritten. I verified locally that lib.rs is getting replaced with an empty file. My first thought would be to allow a list of directories not to replace, and make the default include rust-patches. I'll try this locally and see if this solves the problem.
A minimal example would really help here to understand what the issue is and the best way forward to solve it (if possible).
@LukeMathWalker I've verified that https://github.com/prestontw/cargo-chef/commit/582504172902260d648e701431d252ebc925c579 fixes the problem for me. I'm planning on making this customizable and reproducing a minimal example. I wanted to show you what worked first, though, in case you had thoughts.