-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow config to specify dependency overrides as git links #1481
Comments
You already can, and I would say using |
Yes using path overrides should cover this use case, but did that not suffice for you? |
Path overrides are great, but require you to locally clone the repository in question. What I was looking for was a mechanism to directly specify a git link for the override, rather than a local path. Cloning the repo locally isn't particularly difficult, but it does make your build then depend on local paths. I'm trying to write some commit hooks that can test a local project on commit, and it would simplify things if the local project didn't have path dependencies (outside of the project tree). |
@hugoduncan in the link Alex posted, it shows using a git link. |
@steveklabnik iiuc, that link shows using a git link in In The # .cargo/config
[dependencies.conduit]
git = "https://github.com/conduit-rust/conduit.git" This would override the dependency for conduit in |
So, I went and tried it, and I just literally thought that it worked but it doesn't. So I guess consider that a huge 👍 from me. |
Hm I suppose I don't personally see too much difference in editing #conduit = "0.7.0"
conduit = { git = "https://github.com/conduit-rust/conduit" } Could you elaborate a little more on why you want to specifically avoid editing |
The Apologies for multiple notifications - I managed to accidentally delete my previous reply. |
I've now tried using
|
Ah yes I tend to often forget the subtle difference, but I'm not sure I'm totally sold on this feature yet as we'd in theory need an override syntax for all forms of dependencies at that point (e.g. crates.io deps, path deps, SVN deps eventually, etc). Sticking to just paths doesn't really seem like it's that much overhead as a clone isn't really too hard to do. |
A clone isn't particularly hard to do. However, I'm trying to write some build automation based on using (docker) containers, and it does add to the complexity of that automation. |
Well in some sense the complexity has to live somewhere :) |
I'm also looking for a commit-able way to override package sources, see sfackler/rust-postgres#130 for an example of something that I could have easily resolved with it. |
I'm running into something like this as well. Using a git override in the (Specifically, I build against |
Cargo supports As this is an old issue and dependency overriding has evolved since then, I am going to close this. If it is wrong or your scenario is yet covered, please file a new issue. Thank you! |
When working on nightly, it is sometimes expedient to use a crate that has been updated but not yet pushed to crates.io. Being able to specify the git link for the crate as an override would avoid having to edit
Cargo.toml
.This would also be useful when wanting to try a project using a pull request from a depency's repository.
The text was updated successfully, but these errors were encountered: