From dde69d50b5de42c69268a0d18c200c5b40764507 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 12 Feb 2023 23:19:26 -0500 Subject: [PATCH] Move more dependencies into workspace dependencies (#2842) --- Cargo.toml | 12 ++++++++++++ crates/flake8_to_ruff/Cargo.toml | 20 ++++++++++---------- crates/ruff/Cargo.toml | 20 ++++++++++---------- crates/ruff_cli/Cargo.toml | 12 ++++++------ crates/ruff_dev/Cargo.toml | 14 +++++++------- crates/ruff_macros/Cargo.toml | 2 +- crates/ruff_python/Cargo.toml | 6 +++--- 7 files changed, 49 insertions(+), 37 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1a649989c6..590d46014e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,9 +3,21 @@ members = ["crates/*"] default-members = ["crates/ruff", "crates/ruff_cli"] [workspace.dependencies] +anyhow = { version = "1.0.66" } +clap = { version = "4.0.1", features = ["derive"] } +itertools = { version = "0.10.5" } libcst = { git = "https://github.com/charliermarsh/LibCST", rev = "f2f0b7a487a8725d161fe8b3ed73a6758b21e177" } +once_cell = { version = "1.16.0" } +regex = { version = "1.6.0" } +rustc-hash = { version = "1.1.0" } rustpython-common = { git = "https://github.com/RustPython/RustPython.git", rev = "61b48f108982d865524f86624a9d5bc2ae3bccef" } rustpython-parser = { features = ["lalrpop"], git = "https://github.com/RustPython/RustPython.git", rev = "61b48f108982d865524f86624a9d5bc2ae3bccef" } +schemars = { version = "0.8.11" } +serde = { version = "1.0.147", features = ["derive"] } +serde_json = { version = "1.0.87" } +strum = { version = "0.24.1", features = ["strum_macros"] } +strum_macros = { version = "0.24.3" } +toml = { version = "0.6.0" } [profile.release] panic = "abort" diff --git a/crates/flake8_to_ruff/Cargo.toml b/crates/flake8_to_ruff/Cargo.toml index 6a79d1c804..04403e224f 100644 --- a/crates/flake8_to_ruff/Cargo.toml +++ b/crates/flake8_to_ruff/Cargo.toml @@ -4,16 +4,16 @@ version = "0.0.246" edition = "2021" [dependencies] -anyhow = { version = "1.0.66" } -clap = { version = "4.0.1", features = ["derive"] } +anyhow = { workspace = true } +clap = { workspace = true } colored = { version = "2.0.0" } configparser = { version = "3.0.2" } -once_cell = { version = "1.16.0" } -regex = { version = "1.6.0" } +once_cell = { workspace = true } +regex = { workspace = true } ruff = { path = "../ruff", default-features = false } -rustc-hash = { version = "1.1.0" } -serde = { version = "1.0.147", features = ["derive"] } -serde_json = { version = "1.0.87" } -strum = { version = "0.24.1", features = ["strum_macros"] } -strum_macros = { version = "0.24.3" } -toml = { version = "0.6.0" } +rustc-hash = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +strum = { workspace = true } +strum_macros = { workspace = true } +toml = { workspace = true } diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index 702002853b..0b3ec7fc8d 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -16,7 +16,7 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -anyhow = { version = "1.0.66" } +anyhow = { workspace = true } bisection = { version = "0.1.0" } bitflags = { version = "1.3.2" } cfg-if = { version = "1.0.0" } @@ -29,32 +29,32 @@ glob = { version = "0.3.0" } globset = { version = "0.4.9" } ignore = { version = "0.4.18" } imperative = { version = "1.0.3" } -itertools = { version = "0.10.5" } +itertools = { workspace = true } libcst = { workspace = true } log = { version = "0.4.17" } natord = { version = "1.0.9" } nohash-hasher = { version = "0.2.0" } num-bigint = { version = "0.4.3" } num-traits = "0.2.15" -once_cell = { version = "1.16.0" } +once_cell = { workspace = true } path-absolutize = { version = "3.0.14", features = ["once_cell_cache", "use_unix_paths_on_wasm"] } -regex = { version = "1.6.0" } +regex = { workspace = true } ruff_macros = { version = "0.0.246", path = "../ruff_macros" } ruff_python = { version = "0.0.246", path = "../ruff_python" } -rustc-hash = { version = "1.1.0" } +rustc-hash = { workspace = true } rustpython-common = { workspace = true } rustpython-parser = { workspace = true } -schemars = { version = "0.8.11" } +schemars = { workspace = true } semver = { version = "1.0.16" } -serde = { version = "1.0.147", features = ["derive"] } +serde = { workspace = true } shellexpand = { version = "3.0.0" } smallvec = { version = "1.10.0" } -strum = { version = "0.24.1", features = ["strum_macros"] } -strum_macros = { version = "0.24.3" } +strum = { workspace = true } +strum_macros = { workspace = true } textwrap = { version = "0.16.0" } thiserror = { version = "1.0" } titlecase = { version = "2.2.1" } -toml = { version = "0.6.0" } +toml = { workspace = true } # https://docs.rs/getrandom/0.2.7/getrandom/#webassembly-support # For (future) wasm-pack support diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index 1f68d461a4..5d30cc9674 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -27,7 +27,7 @@ doc = false ruff = { path = "../ruff" } annotate-snippets = { version = "0.9.1", features = ["color"] } -anyhow = { version = "1.0.66" } +anyhow = { workspace = true } atty = { version = "0.2.14" } bincode = { version = "1.3.3" } bitflags = { version = "1.3.2" } @@ -40,7 +40,7 @@ colored = { version = "2.0.0" } filetime = { version = "0.2.17" } glob = { version = "0.3.0" } ignore = { version = "0.4.18" } -itertools = { version = "0.10.5" } +itertools = { workspace = true } log = { version = "0.4.17" } mdcat = { version = "1.0.0", default-features = false } notify = { version = "5.0.0" } @@ -48,10 +48,10 @@ path-absolutize = { version = "3.0.14", features = ["once_cell_cache"] } pulldown-cmark = { version = "0.9.2", default-features = false, features = ['simd'] } quick-junit = { version = "0.3.2" } rayon = { version = "1.5.3" } -regex = { version = "1.6.0" } -rustc-hash = { version = "1.1.0" } -serde = { version = "1.0.147", features = ["derive"] } -serde_json = { version = "1.0.87" } +regex = { workspace = true } +rustc-hash = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } similar = { version = "2.2.1" } strum = { version = "0.24.1" } syntect = { version = "5.0.0", default-features = false, features = ["parsing", "regex-fancy", "default-themes", "default-syntaxes"] } diff --git a/crates/ruff_dev/Cargo.toml b/crates/ruff_dev/Cargo.toml index 2631f54061..e76ab155ef 100644 --- a/crates/ruff_dev/Cargo.toml +++ b/crates/ruff_dev/Cargo.toml @@ -4,17 +4,17 @@ version = "0.0.246" edition = "2021" [dependencies] -anyhow = { version = "1.0.66" } -clap = { version = "4.0.1", features = ["derive"] } -itertools = { version = "0.10.5" } +anyhow = { workspace = true } +clap = { workspace = true } +itertools = { workspace = true } libcst = { workspace = true } -once_cell = { version = "1.16.0" } +once_cell = { workspace = true } ruff = { path = "../ruff" } ruff_cli = { path = "../ruff_cli" } rustpython-common = { workspace = true } rustpython-parser = { workspace = true } -schemars = { version = "0.8.11" } +schemars = { workspace = true } serde_json = { version = "1.0.91" } -strum = { version = "0.24.1", features = ["strum_macros"] } -strum_macros = { version = "0.24.3" } +strum = { workspace = true } +strum_macros = { workspace = true } textwrap = { version = "0.16.0" } diff --git a/crates/ruff_macros/Cargo.toml b/crates/ruff_macros/Cargo.toml index ac87ff9ace..230774e298 100644 --- a/crates/ruff_macros/Cargo.toml +++ b/crates/ruff_macros/Cargo.toml @@ -12,4 +12,4 @@ proc-macro2 = { version = "1.0.47" } quote = { version = "1.0.21" } syn = { version = "1.0.103", features = ["derive", "parsing", "extra-traits"] } textwrap = { version = "0.16.0" } -itertools = { version = "0.10.5" } +itertools = { workspace = true } diff --git a/crates/ruff_python/Cargo.toml b/crates/ruff_python/Cargo.toml index 845644ee60..6c9250db90 100644 --- a/crates/ruff_python/Cargo.toml +++ b/crates/ruff_python/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [lib] [dependencies] -once_cell = { version = "1.16.0" } -regex = { version = "1.6.0" } -rustc-hash = { version = "1.1.0" } +once_cell = {workspace = true} +regex = { workspace = true } +rustc-hash = { workspace = true }