`Cargo doc` failed on windows.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
I want to build documentation locally on my windows, so I just copy-paste the command in https://github.com/uutils/uutils.github.io.
But it failed as follows:
warning: output filename collision.
The lib target `stdbuf` in package `uu_stdbuf_libstdbuf v0.2.2 (D:\msys2\home\test\src\coreutils-main\src\uu\stdbuf\src\libstdbuf)` has the same output filename as the bin target `stdbuf` in package `uu_stdbuf v0.2.2 (D:\msys2\home\test\src\coreutils-main\src\uu\stdbuf)`.
Colliding filename is: D:\msys2\home\test\src\coreutils-main\target\doc\stdbuf\index.html
The targets should have unique names.
This is a known bug where multiple crates with the same name use
the same path; see <https://github.com/rust-lang/cargo/issues/6313>.
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `platform`
--> src\uu\stdbuf\build.rs:92:43
|
92 | let lib_name = format!("libstdbuf{}", platform::DYLIB_EXT);
| ^^^^^^^^ use of unresolved module or unlinked crate `platform`
|
= help: if you wanted to use a crate named `platform`, use `cargo add platform` to add it to your `Cargo.toml`
I don't know much about how rustdoc works, so I just adjust the command trying not to include the stdbuf:
cargo doc --no-deps -F default --workspace
But it still failed for the same reason.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported cargo doc --workspace failure on Windows and inspect src/uu/stdbuf/build.rs around line 92, where platform::DYLIB_EXT is unresolved. Compare the documentation command with the stdbuf library and binary targets. Done means the documented command completes without the unresolved platform error or the reported output collision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100