Identical target names within different crates in a workspace have colliding docs paths #15139
Labels
C-bug
Category: bug
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
The lib target
the_engine
in packagelibrary v0.1.0 (/home/runner/work/the-engine/the-engine/library)
has the same output filename as the bin targetthe-engine
in packageexecutable v0.1.0 (/home/runner/work/the-engine/the-engine/binary)
.Colliding filename is: /home/runner/work/the-engine/the-engine/target/doc/the_engine/index.html
While this directs to #6313, it looks to actually just be a Cargo bug since it's weird to require separate crates within a workspace to guarantee unique target names. Indeed, if I want libthe-engine.so and an executable the-engine (or the-engine.dll and the-engine.exe on Windows), it seems reasonable I should be able to do so within the same workspace. It looks like the root of the problem is that cargo doc uses the name of the workspace rather than also including the name of the crate.
Steps
Possible Solution(s)
No response
Notes
The reason I think this is a bug is because a crate within a workspace should not have too much of an observable difference in behavior from a crate outside the workspace that does the same thing. Yet in this case the lack of namespacing by crate by cargo doc within a workspace results in a difference of behavior that you wouldn't observe with a crate hosted in its own repository.
Version
The text was updated successfully, but these errors were encountered: