-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to dynamically patch a dependency #3830
Comments
We already have |
Yes, Also, the documentation for it looks like you need to put something on git/github to use replace. I did not though of trying this with a |
Yes this is the intended use case of We already have a feature for this, though, so I'm going to close this. Let me know if it doesn't work though! |
I'd like to see this issue reopened. While we do now have the [patch] manifest section, this still requires checking out the source code for the entire crate even if only a few lines of the source actually need to be modified. This seems reasonable for individual Rust projects, however when embedded in much larger build systems that pull hundreds of packages together (e.g. buildroot, openwrt, etc) this quickly becomes unwieldy; each package could represent its own Rust project. What these build systems do is that rather than storing the entire source code for every package they modify, they only store a patch set against a specific release version for each package. I think this would definitely help with the 2017 roadmap goal of better integration with large build systems. I'm not sure if I should be posting this here or if I should open an new issue to open the discussion on this again but I'd love to hear some feedback. |
@hetmankp it's probably best to open a new issue at this point explaining why this is needed and why |
Say I have a (list of) patch I want to apply to one of the dependencies of my crate, but I can not have it merged upstream. It would be good if cargo could apply the patch at build time on this crate.
This feature would be useful in the following cases:
How this could work
The patch would only be accepted in the unified diff format, at a fixed directory level. At build time, cargo would unpack the crate sources, parse the diff and apply it to the source before proceeding with compilation.
Are there any drawback of doing this I did not though of?
The text was updated successfully, but these errors were encountered: