You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
On Windows, the documentation for a project using Tokio cannot be build with docsrs enabled. This makes it difficult-to-impossible to include the automatically generated feature flag details. More details are available from this post on the Rust Users forum.
A test project was created with cargo new tokio-issue-112683.
Cargo.toml was updated to this...
[package]
name = "tokio-issue-112683"version = "0.1.0"edition = "2021"
[dependencies]
tokio = { version = "1.38.0", features = ["full"] }
[package.metadata.docs.rs]
all-features = truerustdoc-args = ["--cfg", "docsrs"]
Set the RUSTFLAGS environment variable... set RUSTFLAGS=--cfg docsrs
Then try to build the documentation... cargo +nightly doc --all-features
The error list is long...
Checking tokio v1.38.0
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\bcook\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.38.0\src\io\bsd\poll_aio.rs:12:14
|
12 | use std::os::unix::io::AsRawFd;
| ^^^^ could not find `unix` in `os`
|
note: found an item that was configured out
--> C:\Users\bcook\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:26:9
|
26 | pub mod unix {}
| ^^^^
note: found an item that was configured out
--> C:\Users\bcook\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:64:9
|
64 | pub mod unix;
| ^^^^
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\bcook\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.38.0\src\io\bsd\poll_aio.rs:13:14
|
13 | use std::os::unix::prelude::RawFd;
| ^^^^ could not find `unix` in `os`
|
note: found an item that was configured out
--> C:\Users\bcook\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:26:9
|
26 | pub mod unix {}
| ^^^^
note: found an item that was configured out
--> C:\Users\bcook\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:64:9
|
64 | pub mod unix;
| ^^^^
...
The text was updated successfully, but these errors were encountered:
I think that we should probably only support building docs that include items from all platforms on unix. But trying to build docs on windows should still successfully build docs for the things that are available on windows.
Version
1.38.0
Platform
Windows 11 Pro / 64 bit
Description
On Windows, the documentation for a project using Tokio cannot be build with
docsrs
enabled. This makes it difficult-to-impossible to include the automatically generated feature flag details. More details are available from this post on the Rust Users forum.A test project was created with
cargo new tokio-issue-112683
.Cargo.toml was updated to this...
Set the
RUSTFLAGS
environment variable...set RUSTFLAGS=--cfg docsrs
Then try to build the documentation...
cargo +nightly doc --all-features
The error list is long...
The text was updated successfully, but these errors were encountered: