From 74695118c67aa84456e2cf1c60905a1cd8bfa355 Mon Sep 17 00:00:00 2001 From: Rodolfo P A <6721075+rodoufu@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:42:09 +0000 Subject: [PATCH] Using workspace dependencies --- Cargo.toml | 17 +++++++++++++++++ examples/Cargo.toml | 16 ++++++++-------- tracing-appender/Cargo.toml | 10 +++++----- tracing-attributes/Cargo.toml | 2 +- tracing-core/Cargo.toml | 2 +- tracing-flame/Cargo.toml | 4 ++-- tracing-futures/Cargo.toml | 6 +++--- tracing-journald/Cargo.toml | 4 ++-- tracing-log/Cargo.toml | 4 ++-- tracing-serde/Cargo.toml | 4 ++-- tracing-subscriber/Cargo.toml | 18 +++++++++--------- tracing-test/Cargo.toml | 2 +- tracing-tower/Cargo.toml | 6 +++--- tracing/Cargo.toml | 10 +++++----- 14 files changed, 61 insertions(+), 44 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b83b1fcc47..84a03b7b98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,3 +18,20 @@ members = [ "tracing-journald", "examples" ] + +[workspace.dependencies] +criterion = "0.3.6" +futures = "0.3.21" +http = "0.2.8" +log = "0.4.17" +nu-ansi-term = "0.46.0" +once_cell = "1.19" +parking_lot = "0.12.1" +pin-project-lite = "0.2.9" +serde = "1.0.139" +serde_json = "1.0.82" +tempfile = "3.3.0" +thiserror = "1.0.31" +time = "0.3.2" +tokio = "1.20.0" +tokio-test = "0.4.2" \ No newline at end of file diff --git a/examples/Cargo.toml b/examples/Cargo.toml index f10a324c79..0add0241b4 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -25,28 +25,28 @@ tracing-appender = { path = "../tracing-appender" } tracing-journald = { path = "../tracing-journald" } # serde example -serde_json = "1.0.82" +serde_json = { workspace = true } -futures = "0.3.21" -tokio = { version = "1.20.0", features = ["full"] } +futures = { workspace = true } +tokio = { workspace = true, features = ["full"] } # tower examples tower = { version = "0.4.13", features = ["full"] } -http = "0.2.8" +http = { workspace = true } hyper = { version = "0.14.20", features = ["full"] } rand = "0.7.3" bytes = "1.2.0" argh = "0.1.8" # sloggish example -nu-ansi-term = "0.46.0" +nu-ansi-term = { workspace = true } humantime = "2.1.0" -log = "0.4.17" +log = { workspace = true } # inferno example inferno = "0.11.6" -tempfile = "3.3.0" +tempfile = { workspace = true } # fmt examples snafu = "0.6.10" -thiserror = "1.0.31" +thiserror = { workspace = true } diff --git a/tracing-appender/Cargo.toml b/tracing-appender/Cargo.toml index 28870f18f3..0ed1bbeac9 100644 --- a/tracing-appender/Cargo.toml +++ b/tracing-appender/Cargo.toml @@ -22,9 +22,9 @@ rust-version = "1.53.0" [dependencies] crossbeam-channel = "0.5.5" -time = { version = "0.3.2", default-features = false, features = ["formatting", "parsing"] } -parking_lot = { optional = true, version = "0.12.1" } -thiserror = "1.0.31" +time = { workspace = true, default-features = false, features = ["formatting", "parsing"] } +parking_lot = { workspace = true, optional = true } +thiserror = { workspace = true } [dependencies.tracing-subscriber] path = "../tracing-subscriber" @@ -35,8 +35,8 @@ features = ["fmt", "std"] [dev-dependencies] criterion = { version = "0.3.6", default_features = false } tracing = { path = "../tracing", version = "0.2" } -time = { version = "0.3.2", default-features = false, features = ["formatting", "parsing"] } -tempfile = "3.3.0" +time = { workspace = true, default-features = false, features = ["formatting", "parsing"] } +tempfile = { workspace = true } [[bench]] name = "bench" diff --git a/tracing-attributes/Cargo.toml b/tracing-attributes/Cargo.toml index 33d988a5cf..cb61a99fef 100644 --- a/tracing-attributes/Cargo.toml +++ b/tracing-attributes/Cargo.toml @@ -49,7 +49,7 @@ quote = "1.0.20" [dev-dependencies] tracing = { path = "../tracing", version = "0.2" } tracing-mock = { path = "../tracing-mock" } -tokio-test = "0.4.2" +tokio-test = { workspace = true } tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", features = [ "env-filter", ] } diff --git a/tracing-core/Cargo.toml b/tracing-core/Cargo.toml index c56b59f262..39a6e45390 100644 --- a/tracing-core/Cargo.toml +++ b/tracing-core/Cargo.toml @@ -35,7 +35,7 @@ std = ["once_cell", "alloc"] maintenance = { status = "actively-developed" } [dependencies] -once_cell = { version = "1.13.0", optional = true } +once_cell = { workspace = true, optional = true } [package.metadata.docs.rs] all-features = true diff --git a/tracing-flame/Cargo.toml b/tracing-flame/Cargo.toml index 597aefe668..c1f6576e2a 100644 --- a/tracing-flame/Cargo.toml +++ b/tracing-flame/Cargo.toml @@ -28,7 +28,7 @@ smallvec = ["tracing-subscriber/smallvec"] [dependencies] tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry", "fmt"] } tracing = { path = "../tracing", version = "0.2", default-features = false, features = ["std"] } -once_cell = "1.13.0" +once_cell = { workspace = true } [dev-dependencies] -tempfile = "3.3.0" +tempfile = { workspace = true } diff --git a/tracing-futures/Cargo.toml b/tracing-futures/Cargo.toml index dc48f28eed..a2c624f5fe 100644 --- a/tracing-futures/Cargo.toml +++ b/tracing-futures/Cargo.toml @@ -28,9 +28,9 @@ std = ["tracing/std"] [dependencies] futures_01 = { package = "futures", version = "0.1.31", optional = true } -futures = { version = "0.3.21", optional = true } +futures = { workspace = true, optional = true } futures-task = { version = "0.3.21", optional = true } -pin-project-lite = { version = "0.2.9", optional = true } +pin-project-lite = { workspace = true, optional = true } tracing = { path = "../tracing", version = "0.2", default-features = false } tokio-executor = { version = "0.1.10", optional = true } tokio_01 = { package = "tokio", version = "0.1.22", optional = true } @@ -41,7 +41,7 @@ mio = "0.6.23" [dev-dependencies] futures = "0.3.21" -tokio-test = "0.4.2" +tokio-test = { workspace = true } tracing-core = { path = "../tracing-core", version = "0.2" } tracing-mock = { path = "../tracing-mock" } tracing-test = { path = "../tracing-test" } diff --git a/tracing-journald/Cargo.toml b/tracing-journald/Cargo.toml index ef22014c3d..6078938f04 100644 --- a/tracing-journald/Cargo.toml +++ b/tracing-journald/Cargo.toml @@ -21,7 +21,7 @@ tracing-core = { path = "../tracing-core", version = "0.2" } tracing-subscriber = { path = "../tracing-subscriber", version = "0.3", default-features = false, features = ["registry"] } [dev-dependencies] -serde_json = "1.0.82" -serde = { version = "1.0.139", features = ["derive"] } +serde_json = { workspace = true } +serde = { workspace = true, features = ["derive"] } tracing = { path = "../tracing", version = "0.2" } diff --git a/tracing-log/Cargo.toml b/tracing-log/Cargo.toml index 8e51f2561c..36b2452bd7 100644 --- a/tracing-log/Cargo.toml +++ b/tracing-log/Cargo.toml @@ -24,8 +24,8 @@ log-tracer = [] [dependencies] tracing-core = { path = "../tracing-core", version = "0.2"} -log = "0.4.17" -once_cell = "1.13.0" +log = { workspace = true } +once_cell = { workspace = true } env_logger = { version = "0.8.4", optional = true } [dev-dependencies] diff --git a/tracing-serde/Cargo.toml b/tracing-serde/Cargo.toml index 8fb16eeac1..bd05b66bd6 100644 --- a/tracing-serde/Cargo.toml +++ b/tracing-serde/Cargo.toml @@ -23,11 +23,11 @@ default = ["std"] std = ["serde/std", "tracing-core/std"] [dependencies] -serde = { version = "1.0.139", default-features = false, features = ["alloc"] } +serde = { workspace = true, default-features = false, features = ["alloc"] } tracing-core = { path = "../tracing-core", version = "0.2", default-features = false } [dev-dependencies] -serde_json = "1.0.82" +serde_json = { workspace = true } [badges] maintenance = { status = "experimental" } diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index 524bf4b482..d681612f82 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -45,20 +45,20 @@ tracing = { optional = true, path = "../tracing", version = "0.2", default-featu matchers = { optional = true, version = "0.1.0" } regex = { optional = true, version = "1.6.0", default-features = false, features = ["std", "unicode-case", "unicode-perl"] } smallvec = { optional = true, version = "1.9.0" } -once_cell = { optional = true, version = "1.13.0" } +once_cell = { workspace = true, optional = true } # fmt tracing-log = { path = "../tracing-log", version = "0.2", optional = true, default-features = false, features = ["log-tracer", "std"] } -nu-ansi-term = { version = "0.46.0", optional = true } -time = { version = "0.3.2", features = ["formatting"], optional = true } +nu-ansi-term = { workspace = true, optional = true } +time = { workspace = true, features = ["formatting"], optional = true } # only required by the json feature -serde_json = { version = "1.0.82", optional = true } -serde = { version = "1.0.139", optional = true } +serde_json = { workspace = true, optional = true } +serde = { workspace = true, optional = true } tracing-serde = { path = "../tracing-serde", version = "0.2", optional = true } # opt-in deps -parking_lot = { version = "0.12.1", optional = true } +parking_lot = { workspace = true, optional = true } chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"], optional = true } # registry @@ -68,12 +68,12 @@ thread_local = { version = "1.1.4", optional = true } [dev-dependencies] tracing = { path = "../tracing", version = "0.2" } tracing-mock = { path = "../tracing-mock", features = ["tracing-subscriber"] } -log = "0.4.17" +log = { workspace = true } tracing-log = { path = "../tracing-log", version = "0.2" } -criterion = { version = "0.3.6", default_features = false } +criterion = { workspace = true, default_features = false } regex = { version = "1.6.0", default-features = false, features = ["std"] } tracing-futures = { path = "../tracing-futures", version = "0.3", default-features = false, features = ["std-future", "std"] } -tokio = { version = "1.20.0", features = ["rt", "macros"] } +tokio = { workspace = true, features = ["rt", "macros"] } # Enable the `time` crate's `macros` feature, for examples. time = { version = "0.3.2", features = ["formatting", "macros"] } diff --git a/tracing-test/Cargo.toml b/tracing-test/Cargo.toml index 40fd7c789c..c7040067f7 100644 --- a/tracing-test/Cargo.toml +++ b/tracing-test/Cargo.toml @@ -19,7 +19,7 @@ rust-version = "1.49.0" publish = false [dependencies] -tokio-test = "0.4.2" +tokio-test = { workspace = true } [package.metadata.docs.rs] all-features = true diff --git a/tracing-tower/Cargo.toml b/tracing-tower/Cargo.toml index 9153e9bdb7..2be4e389cd 100644 --- a/tracing-tower/Cargo.toml +++ b/tracing-tower/Cargo.toml @@ -27,12 +27,12 @@ tower-make = [ [dependencies] tracing = { path = "../tracing", version = "0.2", default-features = false, features = ["std"] } tracing-futures = { version = "0.3", path = "../tracing-futures", features = ["std-future"] } -futures = "0.3.21" +futures = { workspace = true } tower-service = "0.3.2" tower-layer = { version = "0.3.1", optional = true } tower_make = { package = "tower-make", version = "0.3.0", optional = true } -pin-project-lite = { version = "0.2.9", optional = true } -http = { version = "0.2.8", optional = true } +pin-project-lite = { workspace = true, optional = true } +http = { workspace = true, optional = true } [badges] maintenance = { status = "experimental" } diff --git a/tracing/Cargo.toml b/tracing/Cargo.toml index f01783c293..2e44365044 100644 --- a/tracing/Cargo.toml +++ b/tracing/Cargo.toml @@ -32,14 +32,14 @@ rust-version = "1.63.0" [dependencies] tracing-core = { path = "../tracing-core", version = "0.2", default-features = false } -log = { version = "0.4.17", optional = true } +log = { workspace = true, optional = true } tracing-attributes = { path = "../tracing-attributes", version = "0.2", optional = true } -pin-project-lite = "0.2.9" +pin-project-lite = { workspace = true } [dev-dependencies] -criterion = { version = "0.3.6", default_features = false } -futures = { version = "0.3.21", default_features = false } -log = "0.4.17" +criterion = { workspace = true, default_features = false } +futures = { workspace = true, default_features = false } +log = { workspace = true } tracing-mock = { path = "../tracing-mock" } [target.'cfg(target_arch = "wasm32")'.dev-dependencies]