Skip to content
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

cargo doc --open fails on this crate #158

Open
andrewleverette opened this issue Aug 16, 2020 · 2 comments
Open

cargo doc --open fails on this crate #158

andrewleverette opened this issue Aug 16, 2020 · 2 comments
Labels

Comments

@andrewleverette
Copy link

Description

When I run cargo doc --open, the documentation fails to generate. The command results in a few different errors, which I'll paste in full below. The expectation is that the documentation is generated. Also, I'm not using this crate directly as a dependency, but I guess another crate that I am using is. I'm currently using the nightly toolchain but I've also attempted this with the stable build. I've run cargo clean and rebuilt everything and I've also completely wiped the cache in the .cargo directory to force a download of all the crates. If this isn't related to typenum specifically, I apologize. Any help would be greatly appreciated.

Error

error: "C:\Users\Andrew.leverette\Documents\Workspace\antage\antage-modules\antage-data-pipeline\target\doc\src\typenum\Users\Andrew.leverette\Documents\Workspace\antage\antage-modults\Workspace\antage\antage-modules\antage-data-pipeline\target\debug\build\typenum-28f98d028fa98396\out\consts.rs.html": The system cannot find the path specified. (os error 3)

error: couldn't generate documentation: I/O error

error: Could not document `typenum`.

Caused by: 
  process didn't exit successfully: `rustdoc --crate-type lib --crate-name typenum 'C:\Users\Andrew.leverette\.cargo\registry\src\github.com-1ecc6299don=diagnostic-rendered-ansi -L 'b9ec823\typenum-1.12.0\src\lib.rs' --cap-lints allow -o 'C:\Users\Andrew.leverette\Documents\Workspace\antage\antage-modules\antage-data-pipeline\targode: 1)et\doc' --error-format=json --json=diagnostic-rendered-ansi -L 'dependency=C:\Users\Andrew.leverette\Documents\Workspace\antage\antage-modules\antage-data-pipeline\target\debug\deps' --crate-version 1.12.0` (exit code: 1)                                                                                                               
warning: build failed, waiting for other jobs to finish...
error: build failed

Current Toolchain

cargo --version --verbose
cargo 1.47.0-nightly (ab32ee88d 2020-08-10)
release: 1.47.0
commit-hash: ab32ee88dade1b50c77347599e82ca2de3fb8a51
commit-date: 2020-08-10
@paholg
Copy link
Owner

paholg commented Mar 12, 2021

Sorry for the delay.

This looks like an issue with the generated code and windows paths. I don't have a windows machine with Rust to test, but it might be worth trying with the feature force_unix_path_separator. I don't expect that to be better, but it's worth a try (and I think it should generally work on windows so long as you're not cross-compiling).

@paholg paholg added the bug label Mar 12, 2021
@laundmo
Copy link

laundmo commented Jul 2, 2024

This is still a issue, and still happens even with "force_unix_path_separator"

Its quite obnoxious as typenum isn't rare, and i tend to use "cargo doc" a bunch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants