-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Multiple crates with the same name lead to conflicting target/doc/crate
directories
#56169
Labels
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
jonas-schievink
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Jan 27, 2019
This was referenced May 31, 2019
bors
added a commit
to rust-lang/cargo
that referenced
this issue
Jun 3, 2019
Catch filename output collisions in rustdoc. This does some general cleanup so that rustdoc output is computed correctly. This allows the collision detection code to work. There are some known issues with rustdoc creating collisions (rust-lang/rust#61378, rust-lang/rust#56169). This is related to issue #6313. This includes a change that `CompileMode::is_doc` no longer returns `true` for doc tests. This has bothered me for a while, as various points in the code was not handling it correctly. Separating it into `is_doc` and `is_doc_test` I think is better and more explicit. Note for reviewing: There is a big diff in `calc_outputs`, but this is just rearranging code. Everything in `calc_outputs_rustc` is unchanged from the original. The only functional changes should be: - A warning is emitted for colliding rustdoc output. - Don't create an empty fingerprint directory for doc tests.
SimonSapin
changed the title
Docs with
Multiple crates with the same name lead to conflicting Jun 25, 2019
rename-dependency
and depending on multiple versions of the same crate lead to conflicting target/doc/crate
directoriestarget/doc/crate
directories
This can also happen without Lines 4568 to 4569 in 303f77e
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new
rename-dependency
feature in Rust 1.31 makes it possible to depend on multiple versions of the same crate. This mostly works fine, but when building docs, the docs of one version overwrite the docs of the other version.I'm working on adding support for converting arrays from the
nalgebra
crate to thendarray
crate, and I'd like this to work for multiple versions ofnalgebra
. So, I've added this to theCargo.toml
ofndarray
:In
lib.rs
, the features are used for conditional compilation:and the
convert_nalgebra_0_15
andconvert_nalgebra_0_16
modules implement the conversions. For example,convert_nalgebra_0_15
contains(See the full changes here.)
When I build with
cargo +nightly doc --open --features=nalgebra-0_15,nalgebra-0_16
, I see both implementations as expected in docs of thendarray
crate:The problem is that both versions of the docs of
nalgebra
are written to the same location,target/doc/nalgebra
. So, for example, when I click onMatrix
(a type defined in thenalgebra
crate), I get taken totarget/doc/nalgebra/base/struct.Matrix.html
regardless of which version ofnalgebra
it corresponds to.To fix this, I would suggest naming the documentation directories according to the names the crates were renamed to. So, there would be
target/doc/nalgebra-crate-0_15
andtarget/doc/nalgebra-crate-0_16
directories instead of just a singletarget/doc/nalgebra
directory.Meta
rustup run nightly rustc --version --verbose
:The text was updated successfully, but these errors were encountered: