Skip to content

Feature request: cargo-chef support for patches #64

Open

Description

@prestontw

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?

Activity

  1. prestontw commented on Jun 1, 2021

    @prestontw
    ContributorAuthor

    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 #65

  2. added
    enhancement
    on Jun 5, 2021
  3. prestontw commented on Jun 5, 2021

    @prestontw
    ContributorAuthor

    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.

  4. LukeMathWalker commented on Jun 5, 2021

    @LukeMathWalker
    Owner

    A minimal example would really help here to understand what the issue is and the best way forward to solve it (if possible).

  5. prestontw commented on Jun 7, 2021

    @prestontw
    ContributorAuthor

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions