-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ability to "clone and patch" #115
Comments
See also rust-lang/cargo#1545 |
This is great, and I think it's absolutely something we'd like to be able to do. I actually had a conversation with @Eh2406 at Rust Nation about a similar feature, while One question that came up was about where to source the clones of the crates. The thinking was that it may be nice to attempt to The would be to make it easier to upstream changes made to the patch, which I think is something I'd like to encourage. That being said, cloning this way may not be worth the complexity. Maybe we can implement cloning from the registry first and then consider if it's worth also attempting to clone with git. |
Why do you expect cloning from git to be difficult? btw the issue for Cargo to "clone" from a I wonder if those should be separate operations to opt into. |
Ah, I didn't read your links in enough detail. Just noticed that https://github.com/ehuss/cargo-clone-crate is already cloning from the repo. I'll take a look at what that project is doing, and give the links you posted a more detailed look 👀 |
Huh, something missing from https://github.com/ehuss/cargo-clone-crate is to read from |
😮, |
A super simple first step could be printing something like: $ cargo override foo --path ../foo
[...]
The given path does not yet exist. You can clone the upstream repository to this location using:
git clone <repo-url> <path> If the given path does not yet exist, but a package name was given. Would allow the user to easily copy & paste the command to check and run it themselves, and not automatically put something somewhere into the filesystem :) |
Say I want to edit a dep but I don't yet have it locally. Being able to run
cargo override foo --clone
and have it choose a good default location (target/tmp/patches/<spec>
?) would be a big help. I could then override the output location withcargo override foo --clone --path ...
(and the target path must not exist)Some inspiration for the cloning part:
The text was updated successfully, but these errors were encountered: