You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated my rust frrom an old nightly to a recent one.
Now I get this error message:
error: document output filename collision
The bin `otter` in package `otter-cli v0.7.1 (/home/ian/Rustup/Game/server/cli)` has the same name as the lib `otter` in package `otter v0.7.1 (/home/ian/Rustup/Game/server)`.
It suggests using doc = false. I thought I could do that for the cli crate since the rustdocs for a command line program are generally not very useful. But if I do that none of the dependencies specific to the otter-cli crate get documented by cargo doc --workspace.
The correct fix would be to rename the rustdoc output file. But I don't think there is a way to do that. I don't think I can change the crate name for the cli to be different to the binary name. I don't want to change the main otter crate's idea of its own crate name.
I think it was unfortunate to make this a hard error before there was a better workaround.
ISTM that this would be a regression from stable to stable for some projects. (Not mine because unfortunately I'm not able to build on stable at all right now.)
I think it might bite anyone who has a separate binary cli crate which generates a binary whose name is the same as their library crate. That doesn't seem to me to be a wholly unreasonable situation.
The text was updated successfully, but these errors were encountered:
Transferred to the cargo repo, as this is an issue with cargo.
This change was unintentional (part of #9526). I didn't realize that would change existing behavior. I'll look into finding a way to keep the old behavior.
…alexcrichton
Relax doc collision error.
rust-lang#9526 moved the `cargo doc` output name collision code to be shared with the other collision detection code. However, the way it detected collisions wasn't quite the same, and started generating errors for situations that were just warnings before. It was intended that the code should behave the same, so this PR relaxes the checks to be more like the original code. (It's still not 100% the same, but should be close enough.)
Closesrust-lang#9564
I have several crates in my project. In particular, I have a library crate
otter
and a binary crateotter-cli
which generates a binary calledotter
.and
I recently updated my rust frrom an old nightly to a recent one.
Now I get this error message:
It suggests using
doc = false
. I thought I could do that for the cli crate since the rustdocs for a command line program are generally not very useful. But if I do that none of the dependencies specific to theotter-cli
crate get documented bycargo doc --workspace
.The correct fix would be to rename the rustdoc output file. But I don't think there is a way to do that. I don't think I can change the crate name for the cli to be different to the binary name. I don't want to change the main
otter
crate's idea of its own crate name.I think it was unfortunate to make this a hard error before there was a better workaround.
rustc --version --verbose
:ISTM that this would be a regression from stable to stable for some projects. (Not mine because unfortunately I'm not able to build on stable at all right now.)
I think it might bite anyone who has a separate binary cli crate which generates a binary whose name is the same as their library crate. That doesn't seem to me to be a wholly unreasonable situation.
The text was updated successfully, but these errors were encountered: