-
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
Cargo rand compilation errors #5972
Comments
Hi @rida914-4. I'm not able to reproduce getting rand 0.5 with the example you posted. Can you post a copy of your |
cargo 0.19.0-nightly (c995e9e 2017-03-17) I have attached the lock file. You will see mutiple versions of rand. 0.3.22 is the one i specified. and v0.5.5 and 0.4.3, it installs while updating the registry. |
It looks like the An alternative if you check your Another option is to check out your own copy of Maybe someone else knows of a better way to override the dependency, but I'm not aware of any other methods. |
Thanks for such a detailed answer. That was spot on. The issue is due to twox-hash. I am trying to apply patch in the main Cargo.toml file. However, it is not working. is this how we override the dependencies and sub dependencies?
is this how we patch?
Both are not working. |
I don't think patching will affect dependencies of dependencies. If you want to use the patching approach, you'll need to clone the [dependencies]
twox-hash = "1.1.1"
[replace]
"twox-hash:1.1.1" = {path="twox-hash-1.1.1"} Are you unable to change the dependency of |
I was able to resolve the error using the above method. |
Ok great! Sounds like this was sorted out, so I'm gonna close this. |
Hi,
This is a general cargo question as a beginner.
I have a rust code which uses rand so i add rand="0.4.3" as a dependency. Idk why when the registry updates randv0.5.5(latest) is automatically downloaded and it also runs into "break loop" error which was stabilized a while ago. I am not sure how to suppress this error or make it not install the latest version.
Cargo.toml
[package]
name = "hello-world"
version = "0.0.0"
authors = [""]
[dependencies]
time = ">=0.1.0"
rand = "0.4.3"
rustc-serialize = "0.3"
histogram = "*"
I get this error. The repository is not cloned locally so i cannot apply the patch rust-lang/rust#37339.
What am i doing wrong? What is the right way to go about it?
The text was updated successfully, but these errors were encountered: