From 8a79c2729db168e1b5b18069326c93c881f5bfba Mon Sep 17 00:00:00 2001 From: onalante-msft <89409054+onalante-msft@users.noreply.github.com> Date: Mon, 9 May 2022 17:52:04 -0700 Subject: [PATCH] Include futures as full dependency for documentation only Signed-off-by: onalante-msft <89409054+onalante-msft@users.noreply.github.com> --- Makefile | 2 +- kube-runtime/Cargo.toml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0b7acb4e3..d84dd6d45 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ fmt: rustfmt +nightly --edition 2021 $$(find . -type f -iname *.rs) doc: - RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_23 --open + RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=__for_docs_only_do_not_use,derive,ws,oauth,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_23 --open test: cargo test --lib --all diff --git a/kube-runtime/Cargo.toml b/kube-runtime/Cargo.toml index c2260fe77..c37c3c11b 100644 --- a/kube-runtime/Cargo.toml +++ b/kube-runtime/Cargo.toml @@ -20,6 +20,7 @@ features = ["k8s-openapi/v1_23"] rustdoc-args = ["--cfg", "docsrs"] [dependencies] +futures = { version = "0.3.17", optional = true } futures-channel = { version = "0.3.17", features = ["sink"] } futures-util = { version = "0.3.17", features = ["sink"] } kube-client = { path = "../kube-client", version = "=0.71.0", default-features = false, features = ["jsonpatch", "client"] } @@ -53,3 +54,7 @@ schemars = "0.8.6" version = "0.14.0" default-features = false features = ["v1_23"] + +[features] +# Switch to "dep:futures" if/when rust-version >= 1.60 +__for_docs_only_do_not_use = ["futures"]