Skip to content

Commit 70a548e

Browse files
authored
chore: replace cargo-machete with cargo-shear, removed unused deps (#3247)
1 parent 95af815 commit 70a548e

File tree

7 files changed

+21
-27
lines changed

7 files changed

+21
-27
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
with:
6666
toolchain: stable
6767
components: rustfmt, clippy
68-
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
68+
- uses: taiki-e/install-action@6f9c7cc51aa54b13cbcbd12f8bbf69d8ba405b4b # v2.62.47
6969
with:
7070
tool: cargo-hack
7171
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
@@ -93,7 +93,7 @@ jobs:
9393
# https://github.com/awslabs/cargo-check-external-types/releases
9494
toolchain: nightly-2025-05-04
9595
components: rustfmt
96-
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
96+
- uses: taiki-e/install-action@6f9c7cc51aa54b13cbcbd12f8bbf69d8ba405b4b # v2.62.47
9797
with:
9898
9999
- name: external-type-check
@@ -117,7 +117,7 @@ jobs:
117117
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
118118
with:
119119
toolchain: stable
120-
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
120+
- uses: taiki-e/install-action@6f9c7cc51aa54b13cbcbd12f8bbf69d8ba405b4b # v2.62.47
121121
with:
122122
tool: cargo-msrv
123123
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
@@ -150,7 +150,7 @@ jobs:
150150
uses: EmbarkStudios/cargo-deny-action@f2ba7abc2abebaf185c833c3961145a3c275caad # v2.0.13
151151
with:
152152
command: check bans
153-
153+
154154
- name: Check sources
155155
uses: EmbarkStudios/cargo-deny-action@f2ba7abc2abebaf185c833c3961145a3c275caad # v2.0.13
156156
with:
@@ -199,7 +199,7 @@ jobs:
199199
with:
200200
repo-token: ${{ secrets.GITHUB_TOKEN }}
201201
- name: Install cargo-llvm-cov
202-
uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
202+
uses: taiki-e/install-action@6f9c7cc51aa54b13cbcbd12f8bbf69d8ba405b4b # v2.62.47
203203
with:
204204
tool: cargo-llvm-cov
205205
- name: cargo generate-lockfile
@@ -232,7 +232,7 @@ jobs:
232232
cargo build
233233
fi
234234
done
235-
cargo-machete:
235+
cargo-shear:
236236
continue-on-error: true
237237
runs-on: ubuntu-latest
238238
steps:
@@ -246,9 +246,12 @@ jobs:
246246
submodules: true
247247
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
248248
with:
249-
toolchain: stable
250-
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
249+
toolchain: nightly
250+
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
251+
with:
252+
repo-token: ${{ secrets.GITHUB_TOKEN }}
253+
- uses: taiki-e/install-action@6f9c7cc51aa54b13cbcbd12f8bbf69d8ba405b4b # v2.62.47
251254
with:
252-
tool: cargo-machete
253-
- name: cargo machete
254-
run: cargo machete
255+
tool: cargo-shear
256+
- name: cargo shear
257+
run: cargo shear --expand

Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ log = "0.4.21"
3333
once_cell = "1.13"
3434
pin-project-lite = "0.2"
3535
prost = "0.14"
36-
prost-build = "0.14"
37-
prost-types = "0.14"
3836
rand = { version = "0.9", default-features = false }
3937
reqwest = { version = "0.12", default-features = false }
4038
serde = { version = "1.0", default-features = false }
@@ -100,3 +98,10 @@ tail_expr_drop_order = "allow"
10098

10199
[workspace.lints.clippy]
102100
all = { level = "warn", priority = 1 }
101+
102+
[workspace.metadata.cargo-shear]
103+
ignored = [
104+
# workspace crates
105+
"opentelemetry-appender-log",
106+
"opentelemetry-jaeger-propagator",
107+
]

examples/tracing-grpc/Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,3 @@ tonic-prost = { workspace = true }
2828

2929
[build-dependencies]
3030
tonic-prost-build = { workspace = true }
31-
32-
[package.metadata.cargo-machete]
33-
ignored = [
34-
"prost", # needed for `tonic-prost-build`
35-
"tonic-prost" # needed for `tonic-prost-build`
36-
]

opentelemetry-otlp/tests/integration_test/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ tracing = {workspace = true}
2323
[target.'cfg(unix)'.dependencies]
2424
opentelemetry-appender-tracing = { path = "../../../opentelemetry-appender-tracing", default-features = false}
2525
opentelemetry-otlp = { path = "../../../opentelemetry-otlp", default-features = false }
26-
opentelemetry-semantic-conventions = { path = "../../../opentelemetry-semantic-conventions" }
2726

2827
[features]
2928
hyper-client = ["opentelemetry-otlp/hyper-client", "opentelemetry-otlp/http-proto", "opentelemetry-otlp/trace", "opentelemetry-otlp/logs", "opentelemetry-otlp/metrics", "internal-logs"]

opentelemetry-prometheus/Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,3 @@ tokio = { version = "1", features = ["full"] }
3737
default = ["internal-logs"]
3838
prometheus-encoding = []
3939
internal-logs = ["tracing"]
40-
41-
[package.metadata.cargo-machete]
42-
ignored = [
43-
"tracing" # needed for `internal-logs`
44-
]

opentelemetry-proto/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ base64 = { workspace = true, optional = true }
6666
[dev-dependencies]
6767
opentelemetry = { workspace = true, features = ["testing"] }
6868
tonic-prost-build = { workspace = true }
69-
prost-build = { workspace = true }
7069
tempfile = { workspace = true }
7170
serde_json = { workspace = true }
7271

opentelemetry/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ opentelemetry_sdk = { path = "../opentelemetry-sdk", features = ["spec_unstable_
4646
criterion = { workspace = true }
4747
rand = { workspace = true, features = ["os_rng", "thread_rng"] }
4848
tokio = { version = "1.0", features = ["full"] }
49-
futures = "0.3"
5049

5150
[[bench]]
5251
name = "metrics"

0 commit comments

Comments
 (0)