Skip to content

Commit aabd5a5

Browse files
authored
Add a 'rustfmt' feature to crates that use gRPC (#1041)
Sometimes we need to be able to read generated code. The linkerd2-proxy-api's 'rustfmt' feature flag makes this behavior optional. This change adds this feature flag to the linkerd crates that depend on linkerd2-proxy-api.
1 parent 8119772 commit aabd5a5

File tree

8 files changed

+14
-10
lines changed

8 files changed

+14
-10
lines changed

Cargo.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,7 @@ dependencies = [
713713
"linkerd-trace-context",
714714
"linkerd-tracing",
715715
"linkerd-transport-header",
716-
"linkerd2-proxy-api",
717716
"pin-project",
718-
"prost-types",
719717
"regex",
720718
"serde_json",
721719
"thiserror",

linkerd/app/core/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ linkerd-metrics = { path = "../../metrics" }
4242
linkerd-transport-header = { path = "../../transport-header" }
4343
linkerd-opencensus = { path = "../../opencensus" }
4444
linkerd-proxy-core = { path = "../../proxy/core" }
45-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main" }
4645
linkerd-proxy-api-resolve = { path = "../../proxy/api-resolve" }
4746
linkerd-proxy-discover = { path = "../../proxy/discover" }
4847
linkerd-proxy-identity = { path = "../../proxy/identity" }
@@ -83,7 +82,3 @@ features = [
8382

8483
[target.'cfg(target_os = "linux")'.dependencies]
8584
linkerd-system = { path = "../../system" }
86-
87-
[dev-dependencies]
88-
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["arbitrary"] }
89-
prost-types = "0.7.0"

linkerd/app/inbound/fuzz/Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,6 @@ dependencies = [
620620
"linkerd-trace-context",
621621
"linkerd-tracing",
622622
"linkerd-transport-header",
623-
"linkerd2-proxy-api",
624623
"pin-project",
625624
"regex",
626625
"serde_json",

linkerd/app/integration/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ a dedicated crate to help the compiler cache dependencies properly.
1313
"""
1414

1515
[features]
16-
# Disable to skip certain tests that should not be run on CI.
17-
flaky_tests = []
16+
flaky_tests = [] # Disable to skip certain tests that should not be run on CI.
17+
rustfmt = ["linkerd2-proxy-api/rustfmt"]
1818

1919
[dependencies]
2020
bytes = "1"

linkerd/proxy/api-resolve/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ description = """
99
Implements the Resolve trait using the proxy's gRPC API
1010
"""
1111

12+
[features]
13+
rustfmt = ["linkerd2-proxy-api/rustfmt"]
14+
1215
[dependencies]
1316
async-stream = "0.3"
1417
futures = { version = "0.3", default-features = false }

linkerd/proxy/identity/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ license = "Apache-2.0"
66
edition = "2018"
77
publish = false
88

9+
[features]
10+
rustfmt = ["linkerd2-proxy-api/rustfmt"]
11+
912
[dependencies]
1013
futures = { version = "0.3", default-features = false }
1114
linkerd2-proxy-api = { git = "https://github.com/linkerd/linkerd2-proxy-api", branch = "main", features = ["identity", "client"] }

linkerd/proxy/tap/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ license = "Apache-2.0"
66
edition = "2018"
77
publish = false
88

9+
[features]
10+
rustfmt = ["linkerd2-proxy-api/rustfmt"]
11+
912
[dependencies]
1013
http = "0.2"
1114
hyper = { version = "0.14.2", features = ["http1", "http2"] }

linkerd/service-profiles/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ description = """
99
Implements client layers for Linkerd ServiceProfiles.
1010
"""
1111

12+
[features]
13+
rustfmt = ["linkerd2-proxy-api/rustfmt"]
14+
1215
[dependencies]
1316
bytes = "1"
1417
futures = { version = "0.3", default-features = false }

0 commit comments

Comments
 (0)