-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Cannot build documentation for pretty_env_logger crate: "multiple rlib candidates for ansi_term
found"
#49002
Comments
Same problem on Rust 1.25 stable:
|
I'm getting this error on windows, so its not a linux issue. |
I suspect this error originates from the fact that there is target info in the dependencies. It looks like rustdoc is including both versions of ansi_term. I will have a look more when I'm on a computer. UpdateHere is (I think) the relevant part of [target.'cfg(all(windows, target_arch = "x86"))'.dependencies]
ansi_term = "0.9" # 0.10 fails to compile on windows x86
[target.'cfg(not(all(windows, target_arch = "x86")))'.dependencies]
ansi_term = "0.10" Update 2I've created a repo to reproduce the issue on github. Update 3Origin of error is src/librustc_metadata/locator.rs:627 |
Fixed by rust-lang/cargo#5345. |
Fantastic, thanks @derekdreery! |
Closing, as this issue was fixed in Cargo and it's been updated in this repo since then. |
I have included the
pretty_env_logger
crate into my project and now my documentation won't build anymore:Above I tried this using nightly, but using stable gives the same result. There is a relevant issue at seanmonstar/pretty-env-logger#14.
The crate itself (and its inclusion into my project) builds and runs fine, only the documentation fails to build, so that is why I assume this is a rustdoc bug. At least I assume it should resolve dependencies in the same way that rustc does. If not then it would be very helpful if rustdoc would continue after the error and finish documenting the other crates, so I can view the documentation for my own crate at least 😅
If my assumptions are totally wrong and this is not a bug in rustdoc at all, then I am very sorry. This is my first bug report so I hope I did everything right. Thank you for making Rust 😄
Meta
The text was updated successfully, but these errors were encountered: