I'm using the redis-0.5.2 package which only works with url-x.y.z, x.y.z < 1.0.0. When compiling my library both url-0.5.9 and url-1.0.0. are downloaded and linking fails when redis is tried to be linked with url-1.0.0. Other packages however may depend on url-1.0.0. Two questions:
Is there a way to force redis being linked (statically..?) with url-0.5.9, whilst other packages use url-1.0.0? If not:...
Is there a way to stop downloading url-1.0.0 under all circumstances?
Just for explanation, the root problem is not you using a newer url version, but the released redis-rs using an url = "*" dependency, which means that it was fine with any version, including breaking new versions. If it did declare (e.g.) url = "0.5.0", Cargo would have downloaded both 0.5.x and 1.0.0 and everything should have worked fine: because url isn't linking to any non-Rust libraries, it'll just be compiled into the output in two different versions.
IIRC, these kinds of dependencies are now disallowed for newly published crates.
@birkenfeld Thanks. I tried that avenue: I corrected redis' url = "*" as you suggested and redis per se compiled fine indeed. However, my own developed library, depending on redis, caused me problems: both url versions were downloaded into my crate dependencies (...probably as you suggest...) where the linker then was trying to link redis with the newer (yet incompatible) version... With jer's suggestion I can go ahead now.
it still wanted to link with url-1.0.0; swapping comments made no difference... Note: redis per se compiled fine, the problem started with my dependency on it....
as the dependency is fixed in master to url = "0.5.4". That would trigger the case I was referring to, where redis uses the 0.5.9 version, and your crate can still use 1.0.0.