Skip to content

Commit f6b4c7a

Browse files
committed
chore: various maintenance
1. Clean-up Dependency Versions (major version only). 2. Remove Unused Dependences. 3. Add Unused Dependency Checker to Testing Workflow. 4. Coverage dose not include examples and benchmarks.
1 parent b777d3a commit f6b4c7a

File tree

8 files changed

+35
-45
lines changed

8 files changed

+35
-45
lines changed

.github/workflows/coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
- id: test
6363
name: Run Unit Tests
64-
run: cargo test --tests --benches --examples --workspace --all-targets --all-features
64+
run: cargo test --tests --workspace --all-targets --all-features
6565

6666
- id: coverage
6767
name: Generate Coverage Report

.github/workflows/testing.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
name: Enable Workflow Cache
5858
uses: Swatinem/rust-cache@v2
5959

60+
- id: tools
61+
name: Install Tools
62+
uses: taiki-e/install-action@v2
63+
with:
64+
tool: cargo-machete
65+
6066
- id: check
6167
name: Run Build Checks
6268
run: cargo check --tests --benches --examples --workspace --all-targets --all-features
@@ -71,6 +77,14 @@ jobs:
7177
RUSTDOCFLAGS: "-D warnings"
7278
run: cargo doc --no-deps --bins --examples --workspace --all-features
7379

80+
- id: clean
81+
name: Clean Build Directory
82+
run: cargo clean
83+
84+
- id: deps
85+
name: Check Unused Dependencies
86+
run: cargo machete
87+
7488

7589
unit:
7690
name: Units

Cargo.lock

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,37 @@ rust-version = "1.72"
3030
version = "3.0.0-alpha.12-develop"
3131

3232
[dependencies]
33+
anyhow = "1"
3334
aquatic_udp_protocol = "0"
3435
async-trait = "0"
3536
axum = { version = "0", features = ["macros"] }
3637
axum-client-ip = "0"
37-
axum-extra = { version = "0.9.2", features = ["query"] }
38+
axum-extra = { version = "0", features = ["query"] }
3839
axum-server = { version = "0", features = ["tls-rustls"] }
3940
binascii = "0"
4041
chrono = { version = "0", default-features = false, features = ["clock"] }
42+
clap = { version = "4", features = ["derive", "env"] }
43+
colored = "2"
4144
config = "0"
4245
derive_more = "0"
4346
fern = "0"
4447
futures = "0"
48+
hex-literal = "0"
4549
hyper = "1"
4650
lazy_static = "1"
4751
log = { version = "0", features = ["release_max_level_info"] }
4852
multimap = "0"
49-
openssl = { version = "0", features = ["vendored"] }
5053
percent-encoding = "2"
5154
r2d2 = "0"
5255
r2d2_mysql = "24"
5356
r2d2_sqlite = { version = "0", features = ["bundled"] }
5457
rand = "0"
55-
reqwest = "0"
58+
reqwest = { version = "0", features = ["json"] }
59+
ringbuf = "0"
5660
serde = { version = "1", features = ["derive"] }
5761
serde_bencode = "0"
5862
serde_bytes = "0"
5963
serde_json = "1"
60-
ringbuf = "0"
61-
serde_with = "3"
6264
serde_repr = "0"
6365
tdyne-peer-id = "1"
6466
tdyne-peer-id-registry = "0"
@@ -68,24 +70,18 @@ torrust-tracker-configuration = { version = "3.0.0-alpha.12-develop", path = "pa
6870
torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.12-develop", path = "contrib/bencode" }
6971
torrust-tracker-located-error = { version = "3.0.0-alpha.12-develop", path = "packages/located-error" }
7072
torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "packages/primitives" }
71-
tower-http = { version = "0", features = ["compression-full", "cors", "trace", "propagate-header", "request-id"] }
73+
tower-http = { version = "0", features = ["compression-full", "cors", "propagate-header", "request-id", "trace"] }
74+
trace = "0"
75+
tracing = "0"
76+
url = "2"
7277
uuid = { version = "1", features = ["v4"] }
73-
colored = "2.1.0"
74-
url = "2.5.0"
75-
tempfile = "3.9.0"
76-
clap = { version = "4.4.18", features = ["derive", "env"]}
77-
anyhow = "1.0.79"
78-
hex-literal = "0.4.1"
79-
trace = "0.1.7"
80-
tracing = "0.1.40"
78+
79+
[package.metadata.cargo-machete]
80+
ignored = ["serde_bytes"]
8181

8282
[dev-dependencies]
83-
criterion = { version = "0.5.1", features = ["async_tokio"] }
8483
local-ip-address = "0"
8584
mockall = "0"
86-
once_cell = "1.18.0"
87-
reqwest = { version = "0", features = ["json"] }
88-
serde_urlencoded = "0"
8985
torrust-tracker-test-helpers = { version = "3.0.0-alpha.12-develop", path = "packages/test-helpers" }
9086

9187
[workspace]

packages/configuration/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ version.workspace = true
1717
[dependencies]
1818
config = "0"
1919
derive_more = "0"
20-
log = { version = "0", features = ["release_max_level_info"] }
2120
serde = { version = "1", features = ["derive"] }
2221
serde_with = "3"
2322
thiserror = "1"

packages/test-helpers/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ rust-version.workspace = true
1515
version.workspace = true
1616

1717
[dependencies]
18-
lazy_static = "1"
1918
rand = "0"
2019
torrust-tracker-configuration = { version = "3.0.0-alpha.12-develop", path = "../configuration" }
2120
torrust-tracker-primitives = { version = "3.0.0-alpha.12-develop", path = "../primitives" }
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
[package]
2+
description = "A set of benchmarks for the torrent repository"
3+
keywords = ["benchmarking", "library", "repository", "torrent"]
24
name = "torrust-torrent-repository-benchmarks"
5+
readme = "README.md"
6+
37
authors.workspace = true
4-
categories.workspace = true
5-
description.workspace = true
68
documentation.workspace = true
79
edition.workspace = true
810
homepage.workspace = true
9-
keywords.workspace = true
1011
license.workspace = true
1112
publish.workspace = true
1213
repository.workspace = true
@@ -18,4 +19,4 @@ aquatic_udp_protocol = "0.8.0"
1819
clap = { version = "4.4.8", features = ["derive"] }
1920
futures = "0.3.29"
2021
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] }
21-
torrust-tracker = { path = "../../" }
22+
torrust-tracker = { path = "../../" }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Benchmarks of the torrent repository

0 commit comments

Comments
 (0)