Skip to content

Commit 3fc1cb0

Browse files
authored
Ensure each crate can be built indpendently (#777)
Some subcrates have unneeded or outdated dependencies. This change updates most of them and adds more comprehensive checks to CI.
1 parent f45f04b commit 3fc1cb0

File tree

13 files changed

+23
-27
lines changed

13 files changed

+23
-27
lines changed

.github/workflows/rust.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ jobs:
2828
- run: make lint
2929

3030
check:
31-
timeout-minutes: 5
31+
timeout-minutes: 15
3232
runs-on: ubuntu-18.04
3333
container:
3434
image: docker://rust:1.47.0-buster
3535
steps:
3636
- uses: actions/checkout@v1
37-
- run: make check
37+
# Iterate through all subcrates to ensure each compiles indpendently.
38+
- run: for d in $(for toml in $(find . -name Cargo.toml) ; do echo ${toml%/*} ; done | sort -r ) ; do echo "# $d" ; (cd $d ; cargo check --all-targets) ; done
3839

3940
test:
4041
timeout-minutes: 15

Cargo.lock

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ dependencies = [
682682
"hyper",
683683
"pin-project 0.4.22",
684684
"tokio 0.3.5",
685-
"tokio-test 0.2.1",
685+
"tokio-test 0.3.0",
686686
"tower",
687687
]
688688

@@ -922,7 +922,7 @@ dependencies = [
922922
"linkerd2-app-outbound",
923923
"linkerd2-app-test",
924924
"tokio 0.3.5",
925-
"tokio-test 0.2.1",
925+
"tokio-test 0.3.0",
926926
"tower",
927927
"tower-test",
928928
"tracing",
@@ -1031,7 +1031,7 @@ dependencies = [
10311031
"linkerd2-error",
10321032
"pin-project 0.4.22",
10331033
"tokio 0.3.5",
1034-
"tokio-test 0.2.1",
1034+
"tokio-test 0.3.0",
10351035
"tower",
10361036
"tower-test",
10371037
"tracing",
@@ -1193,7 +1193,6 @@ version = "0.1.0"
11931193
dependencies = [
11941194
"bytes 0.6.0",
11951195
"futures 0.3.5",
1196-
"h2 0.3.0",
11971196
"http",
11981197
"http-body",
11991198
"hyper",
@@ -1238,7 +1237,6 @@ name = "linkerd2-metrics"
12381237
version = "0.1.0"
12391238
dependencies = [
12401239
"deflate",
1241-
"futures 0.3.5",
12421240
"hdrhistogram",
12431241
"http",
12441242
"hyper",
@@ -1329,7 +1327,6 @@ version = "0.1.0"
13291327
dependencies = [
13301328
"async-stream 0.2.1",
13311329
"futures 0.3.5",
1332-
"indexmap",
13331330
"linkerd2-channel",
13341331
"linkerd2-error",
13351332
"linkerd2-proxy-core",
@@ -1558,7 +1555,7 @@ dependencies = [
15581555
"linkerd2-error",
15591556
"pin-project 0.4.22",
15601557
"tokio 0.3.5",
1561-
"tokio-test 0.2.1",
1558+
"tokio-test 0.3.0",
15621559
"tower",
15631560
"tower-test",
15641561
"tracing",
@@ -1597,7 +1594,7 @@ dependencies = [
15971594
"pin-project 0.4.22",
15981595
"tokio 0.3.5",
15991596
"tokio-connect",
1600-
"tokio-test 0.2.1",
1597+
"tokio-test 0.3.0",
16011598
"tower",
16021599
"tower-test",
16031600
"tracing",

hyper-balance/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ tower = { version = "0.4", default-features = false, features = ["load"]}
1414
tokio = { version = "0.3", features = ["macros"]}
1515

1616
[dev-dependencies]
17-
tokio-test = "0.2"
17+
tokio-test = "0.3"

linkerd/app/gateway/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tracing = "0.1.22"
1717

1818
[dev-dependencies]
1919
tokio = { version = "0.3", features = ["rt", "macros"] }
20-
tokio-test = "0.2"
20+
tokio-test = "0.3"
2121
tower = { version = "0.4", default-features = false, features = ["util"] }
2222
tower-test = "0.3"
23-
linkerd2-app-test = { path = "../test" }
23+
linkerd2-app-test = { path = "../test" }

linkerd/buffer/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ tracing-futures = { version = "0.2", features = ["std-future"] }
1616
pin-project = "0.4"
1717

1818
[dev-dependencies]
19+
tokio = { version = "0.3", features = ["rt-multi-thread"] }
1920
tower-test = "0.3"
20-
tokio-test = "0.2"
21+
tokio-test = "0.3"

linkerd/http-metrics/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ publish = false
88
[dependencies]
99
bytes = "0.6"
1010
futures = "0.3"
11-
h2 = { git = "https://github.com/hyperium/h2" }
1211
http = "0.2"
1312
http-body = "0.4"
1413
hyper = "0.14.0-dev"

linkerd/metrics/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ test_util = []
1212

1313
[dependencies]
1414
deflate = { version = "0.7.18", features = ["gzip"] }
15-
futures = "0.3"
1615
hdrhistogram = { version = "7.1", optional = true }
1716
http = "0.2"
1817
hyper = "0.14.0-dev"

linkerd/opencensus/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ publish = false
77

88
[dependencies]
99
futures = "0.3"
10+
http = "0.2"
11+
http-body = "0.4"
1012
linkerd2-channel = { path = "../channel" }
1113
linkerd2-error = { path = "../error" }
1214
linkerd2-metrics = { path = "../metrics" }
1315
opencensus-proto = { path = "../../opencensus-proto" }
14-
tonic = { version = "0.3", default-features = false, features = ["prost", "codegen"] }
15-
tracing = "0.1.22"
1616
pin-project = "0.4"
17-
http = "0.2"
18-
http-body = "0.4"
17+
tonic = { version = "0.3", default-features = false, features = ["prost", "codegen"] }
1918
tower = { version = "0.4", default-features = false }
19+
tracing = "0.1.22"

linkerd/proxy/discover/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ linkerd2-channel = { path = "../../channel" }
1515
linkerd2-error = { path = "../../error" }
1616
linkerd2-proxy-core = { path = "../core" }
1717
linkerd2-stack = { path = "../../stack" }
18-
indexmap = "1.0"
1918
tokio = { version = "0.3", features = ["sync", "time", "stream"] }
2019
tracing = "0.1.22"
2120
tracing-futures = { version = "0.2", features = ["std-future"] }

linkerd/proxy/transport/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ linkerd2-io = { path = "../../io" }
2828
linkerd2-metrics = { path = "../../metrics" }
2929
linkerd2-stack = { path = "../../stack" }
3030
rustls = "0.18"
31-
tokio = { version = "0.3", features = ["io-util", "net", "time"]}
31+
tokio = { version = "0.3", features = ["io-util", "macros", "net", "time"]}
3232
tokio-rustls = "0.20"
3333
tokio-util = { version = "0.5", features = ["compat"]}
3434
tracing = "0.1.22"
@@ -51,5 +51,6 @@ libc = "0.2"
5151
[dev-dependencies]
5252
linkerd2-identity = { path = "../../identity", features = ["test-util"] }
5353
tracing-subscriber = "0.2.14"
54+
tokio = { version = "0.3", features = ["rt-multi-thread"] }
5455
tower = { version = "0.4", default-features = false, features = ["util"] }
5556
tracing-futures = { version = "0.2", features = ["std-future"] }

0 commit comments

Comments
 (0)