uutils / uutils/coreutils

`Cargo doc` failed on windows.

Open
#8,658 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.