Skip to content

rustdoc: Building docs for tokio panics #83191

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

Closed
davidpdrsn opened this issue Mar 16, 2021 · 3 comments
Closed

rustdoc: Building docs for tokio panics #83191

davidpdrsn opened this issue Mar 16, 2021 · 3 comments
Labels
C-bug Category: This is a bug.

Comments

@davidpdrsn
Copy link

Building the docs in the root of tokio panics with this message:

❯ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
thread 'main' panicked at 'no entry found for key', src/tools/cargo/src/cargo/ops/cargo_compile.rs:1638:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If you go into one of the subdirectories it works:

~/dev/tokio
❯ cd tokio

~/dev/tokio/tokio
❯ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s

Feels like a bug in rustdoc.

Meta

rustup show:

Default host: x86_64-apple-darwin
rustup home:  /Users/david.pedersen/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin
beta-x86_64-apple-darwin
nightly-2020-10-11-x86_64-apple-darwin
nightly-2020-12-28-x86_64-apple-darwin
nightly-2021-03-04-x86_64-apple-darwin
nightly-x86_64-apple-darwin
1.47.0-x86_64-apple-darwin
1.49.0-x86_64-apple-darwin
1.50.0-x86_64-apple-darwin

active toolchain
----------------

nightly-x86_64-apple-darwin (directory override for '...')
rustc 1.52.0-nightly (107896c32 2021-03-15)
Backtrace

❯ RUST_BACKTRACE=1 RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
thread 'main' panicked at 'no entry found for key', src/tools/cargo/src/cargo/ops/cargo_compile.rs:1638:21
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: cargo::ops::cargo_compile::remove_duplicate_doc::visit
   4: cargo::ops::cargo_compile::create_bcx
   5: cargo::ops::cargo_compile::compile_ws
   6: cargo::ops::cargo_compile::compile
   7: cargo::ops::cargo_doc::doc
   8: cargo::commands::doc::exec
   9: cargo::cli::main
  10: cargo::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

cc @Darksonn

@davidpdrsn davidpdrsn added the C-bug Category: This is a bug. label Mar 16, 2021
@Darksonn
Copy link
Contributor

To be clear, Tokio uses the workspace feature. It panics if you run it in the workspace folder, but not in any of the individual crates.

@jonas-schievink
Copy link
Contributor

Looks like Cargo panics, so this should be reported at https://github.com/rust-lang/cargo

@davidpdrsn
Copy link
Author

Filed rust-lang/cargo#9274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants