You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: cargo-chef support for patches #64
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 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.
@LukeMathWalker I've verified that prestontw@5825041 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.
Activity
prestontw commentedon Jun 1, 2021
I think the only thing that is necessary is adding
--offlinesupport to the cargo command that is run, which I've attempted to do in #65prestontw commentedon Jun 5, 2021
I am still running into problems even with
--offlinesupport. I think it's becausecargo chefis overwriting the rust-patches'lib.rsfiles. These should still be treated as dependencies---they should not be overwritten. I verified locally thatlib.rsis getting replaced with an empty file. My first thought would be to allow a list of directories not to replace, and make the default includerust-patches. I'll try this locally and see if this solves the problem.LukeMathWalker commentedon Jun 5, 2021
A minimal example would really help here to understand what the issue is and the best way forward to solve it (if possible).
prestontw commentedon Jun 7, 2021
@LukeMathWalker I've verified that prestontw@5825041 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.