mirror of
https://github.com/tower-rs/tower.git
synced 2025-10-02 07:20:52 +00:00
Fix sometimes-unused dependencies (#603)
`tower` currently has required dependencies that may not be used unless certain features are enabled. This change updates `tower` to make these dependencies optional. Furthermore, this change removes use of `html_root_url`, which is no longer recommended (https://github.com/rust-lang/api-guidelines/pull/230), and updates the documented release instructions.
This commit is contained in:
parent
7f004da56f
commit
d0d8707ac0
@ -1,8 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tower-layer"
|
name = "tower-layer"
|
||||||
# When releasing to crates.io:
|
# When releasing to crates.io:
|
||||||
# - Remove path dependencies
|
|
||||||
# - Update html_root_url.
|
|
||||||
# - Update doc url
|
# - Update doc url
|
||||||
# - Cargo.toml
|
# - Cargo.toml
|
||||||
# - README.md
|
# - README.md
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#![doc(html_root_url = "https://docs.rs/tower-layer/0.3.1")]
|
|
||||||
#![warn(
|
#![warn(
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
missing_docs,
|
missing_docs,
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tower-service"
|
name = "tower-service"
|
||||||
# When releasing to crates.io:
|
# When releasing to crates.io:
|
||||||
# - Remove path dependencies
|
|
||||||
# - Update html_root_url.
|
|
||||||
# - Update doc url
|
# - Update doc url
|
||||||
# - Cargo.toml
|
# - Cargo.toml
|
||||||
# - README.md
|
# - README.md
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#![doc(html_root_url = "https://docs.rs/tower-service/0.3.1")]
|
|
||||||
#![warn(
|
#![warn(
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
missing_docs,
|
missing_docs,
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tower-test"
|
name = "tower-test"
|
||||||
# When releasing to crates.io:
|
# When releasing to crates.io:
|
||||||
# - Remove path dependencies
|
|
||||||
# - Update html_root_url.
|
|
||||||
# - Update doc url
|
# - Update doc url
|
||||||
# - Cargo.toml
|
# - Cargo.toml
|
||||||
# - README.md
|
# - README.md
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#![doc(html_root_url = "https://docs.rs/tower-test/0.4.0")]
|
|
||||||
#![warn(
|
#![warn(
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
missing_docs,
|
missing_docs,
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tower"
|
name = "tower"
|
||||||
# When releasing to crates.io:
|
# When releasing to crates.io:
|
||||||
# - Remove path dependencies
|
|
||||||
# - Update html_root_url.
|
|
||||||
# - Update doc url
|
# - Update doc url
|
||||||
# - Cargo.toml
|
# - Cargo.toml
|
||||||
# - README.md
|
# - README.md
|
||||||
@ -25,6 +23,10 @@ edition = "2018"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["log"]
|
default = ["log"]
|
||||||
|
|
||||||
|
# Internal
|
||||||
|
__common = ["futures-core", "pin-project-lite"]
|
||||||
|
|
||||||
full = [
|
full = [
|
||||||
"balance",
|
"balance",
|
||||||
"buffer",
|
"buffer",
|
||||||
@ -43,30 +45,30 @@ full = [
|
|||||||
"timeout",
|
"timeout",
|
||||||
"util",
|
"util",
|
||||||
]
|
]
|
||||||
|
# FIXME: Use weak dependency once available (https://github.com/rust-lang/cargo/issues/8832)
|
||||||
log = ["tracing/log"]
|
log = ["tracing/log"]
|
||||||
balance = ["discover", "load", "ready-cache", "make", "rand", "slab", "tokio-stream"]
|
balance = ["discover", "load", "ready-cache", "make", "rand", "slab"]
|
||||||
buffer = ["tokio/sync", "tokio/rt", "tokio-util", "tracing"]
|
buffer = ["__common", "tokio/sync", "tokio/rt", "tokio-util", "tracing"]
|
||||||
discover = []
|
discover = ["__common"]
|
||||||
filter = ["futures-util"]
|
filter = ["__common", "futures-util"]
|
||||||
hedge = ["util", "filter", "futures-util", "hdrhistogram", "tokio/time", "tracing"]
|
hedge = ["util", "filter", "futures-util", "hdrhistogram", "tokio/time", "tracing"]
|
||||||
limit = ["tokio/time", "tokio/sync", "tokio-util", "tracing"]
|
limit = ["__common", "tokio/time", "tokio/sync", "tokio-util", "tracing"]
|
||||||
load = ["tokio/time", "tracing"]
|
load = ["__common", "tokio/time", "tracing"]
|
||||||
load-shed = []
|
load-shed = ["__common"]
|
||||||
make = ["tokio/io-std", "futures-util"]
|
make = ["futures-util", "pin-project-lite", "tokio/io-std"]
|
||||||
ready-cache = ["futures-util", "indexmap", "tokio/sync", "tracing"]
|
ready-cache = ["futures-core", "futures-util", "indexmap", "tokio/sync", "tracing"]
|
||||||
reconnect = ["make", "tokio/io-std", "tracing"]
|
reconnect = ["make", "tokio/io-std", "tracing"]
|
||||||
retry = ["tokio/time"]
|
retry = ["__common", "tokio/time"]
|
||||||
spawn-ready = ["futures-util", "tokio/sync", "tokio/rt", "util", "tracing"]
|
spawn-ready = ["__common", "futures-util", "tokio/sync", "tokio/rt", "util", "tracing"]
|
||||||
steer = ["futures-util"]
|
steer = []
|
||||||
timeout = ["tokio/time"]
|
timeout = ["pin-project-lite", "tokio/time"]
|
||||||
util = ["futures-util"]
|
util = ["__common", "futures-util", "pin-project"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures-core = "0.3"
|
|
||||||
pin-project = "1"
|
|
||||||
tower-layer = { version = "0.3.1", path = "../tower-layer" }
|
tower-layer = { version = "0.3.1", path = "../tower-layer" }
|
||||||
tower-service = { version = "0.3.1", path = "../tower-service" }
|
tower-service = { version = "0.3.1", path = "../tower-service" }
|
||||||
|
|
||||||
|
futures-core = { version = "0.3", optional = true }
|
||||||
futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
|
futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
|
||||||
hdrhistogram = { version = "7.0", optional = true }
|
hdrhistogram = { version = "7.0", optional = true }
|
||||||
indexmap = { version = "1.0.2", optional = true }
|
indexmap = { version = "1.0.2", optional = true }
|
||||||
@ -76,11 +78,13 @@ tokio = { version = "1", optional = true, features = ["sync"] }
|
|||||||
tokio-stream = { version = "0.1.0", optional = true }
|
tokio-stream = { version = "0.1.0", optional = true }
|
||||||
tokio-util = { version = "0.6.3", default-features = false, optional = true }
|
tokio-util = { version = "0.6.3", default-features = false, optional = true }
|
||||||
tracing = { version = "0.1.2", default-features = false, features = ["std"], optional = true }
|
tracing = { version = "0.1.2", default-features = false, features = ["std"], optional = true }
|
||||||
pin-project-lite = "0.2.7"
|
pin-project = { version = "1", optional = true }
|
||||||
|
pin-project-lite = { version = "0.2.7", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
hdrhistogram = "7.0"
|
hdrhistogram = "7.0"
|
||||||
|
pin-project-lite = "0.2.7"
|
||||||
tokio = { version = "1", features = ["macros", "sync", "test-util", "rt-multi-thread"] }
|
tokio = { version = "1", features = ["macros", "sync", "test-util", "rt-multi-thread"] }
|
||||||
tokio-stream = "0.1"
|
tokio-stream = "0.1"
|
||||||
tokio-test = "0.4"
|
tokio-test = "0.4"
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#![doc(html_root_url = "https://docs.rs/tower/0.4.11")]
|
|
||||||
#![warn(
|
#![warn(
|
||||||
missing_debug_implementations,
|
missing_debug_implementations,
|
||||||
missing_docs,
|
missing_docs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user