Skip to content

Commit 8db45b5

Browse files
committed
ci: check for public dependencies
1 parent 7b1c8df commit 8db45b5

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://rust-lang.github.io/rfcs/3516-public-private-dependencies.html
2+
[unstable]
3+
public-dependency = true

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
- uses: Swatinem/rust-cache@v2
2525
- name: Check
2626
run: cargo +beta clippy --workspace --all-targets --all-features -- -D warnings
27+
# This check is run for cargo public dependencies
28+
- name: Check nightly
29+
env:
30+
RUSTFLAGS: "-D warnings"
31+
run: cargo +nightly check --workspace --lib --all-features
2732
- name: rustfmt
2833
run: cargo +nightly fmt --all --check
2934

Cargo.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,19 @@ tracing-opentelemetry-0-29 = [
2828
__private_docs = ["tracing-subscriber/time", "tracing-subscriber/local-time"]
2929

3030
[dependencies]
31-
serde = "1.0.202"
32-
serde_json = "1.0.117"
33-
uuid = { version = "1.10.0", features = ["v4"] }
31+
# Public dependencies
32+
serde = { version = "1.0.202", public = true, default-features = false, features = ["std"] }
33+
serde_json = { version = "1.0.117", public = true, default-features = false, features = ["std"] }
34+
tracing-core = { version = "0.1.32", public = true, default-features = false }
35+
tracing = { version = "0.1.40", public = true, default-features = false, features = ["std"] }
36+
tracing-subscriber = { version = "0.3.18", public = true, default-features = false, features = ["std", "registry", "fmt"] }
3437

35-
tracing = { version = "0.1.40", default-features = false, features = ["std"] }
36-
tracing-core = { version = "0.1.32", default-features = false }
38+
# Private dependencies
3739
tracing-log = { version = "0.2.0", default-features = false, optional = true }
3840
tracing-serde = { version = "0.2.0", default-features = false }
39-
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
40-
"std",
41-
"registry",
42-
"fmt",
43-
] }
41+
uuid = { version = "1.10.0", features = ["v4"] }
4442

43+
# Optional dependencies
4544
# OpenTelemetry
4645
tracing-opentelemetry-0-25 = { package = "tracing-opentelemetry", version = "0.25.0", default-features = false, optional = true }
4746
opentelemetry-0-24 = { package = "opentelemetry", version = "0.24.0", default-features = false, optional = true }

0 commit comments

Comments
 (0)