Move sub-crates to workspace dependencies (#11407)

## Summary

This matches the setup we use in `uv` and allows for consistency in the
`Cargo.toml` files.
This commit is contained in:
Charlie Marsh 2024-05-13 10:37:50 -04:00 committed by GitHub
parent b371713591
commit af60d539ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 155 additions and 133 deletions

View file

@ -12,6 +12,28 @@ authors = ["Charlie Marsh <charlie.r.marsh@gmail.com>"]
license = "MIT" license = "MIT"
[workspace.dependencies] [workspace.dependencies]
ruff = { path = "crates/ruff" }
ruff_cache = { path = "crates/ruff_cache" }
ruff_diagnostics = { path = "crates/ruff_diagnostics" }
ruff_formatter = { path = "crates/ruff_formatter" }
ruff_index = { path = "crates/ruff_index" }
ruff_linter = { path = "crates/ruff_linter" }
ruff_macros = { path = "crates/ruff_macros" }
ruff_notebook = { path = "crates/ruff_notebook" }
ruff_python_ast = { path = "crates/ruff_python_ast" }
ruff_python_codegen = { path = "crates/ruff_python_codegen" }
ruff_python_formatter = { path = "crates/ruff_python_formatter" }
ruff_python_index = { path = "crates/ruff_python_index" }
ruff_python_literal = { path = "crates/ruff_python_literal" }
ruff_python_parser = { path = "crates/ruff_python_parser" }
ruff_python_semantic = { path = "crates/ruff_python_semantic" }
ruff_python_stdlib = { path = "crates/ruff_python_stdlib" }
ruff_python_trivia = { path = "crates/ruff_python_trivia" }
ruff_server = { path = "crates/ruff_server" }
ruff_source_file = { path = "crates/ruff_source_file" }
ruff_text_size = { path = "crates/ruff_text_size" }
ruff_workspace = { path = "crates/ruff_workspace" }
aho-corasick = { version = "1.1.3" } aho-corasick = { version = "1.1.3" }
annotate-snippets = { version = "0.9.2", features = ["color"] } annotate-snippets = { version = "0.9.2", features = ["color"] }
anyhow = { version = "1.0.80" } anyhow = { version = "1.0.80" }

View file

@ -12,11 +12,11 @@ license.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
ruff_index = { path = "../ruff_index" } ruff_index = { workspace = true }
ruff_notebook = { path = "../ruff_notebook" } ruff_notebook = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
bitflags = { workspace = true } bitflags = { workspace = true }

View file

@ -13,17 +13,17 @@ readme = "../../README.md"
default-run = "ruff" default-run = "ruff"
[dependencies] [dependencies]
ruff_cache = { path = "../ruff_cache" } ruff_cache = { workspace = true }
ruff_diagnostics = { path = "../ruff_diagnostics" } ruff_diagnostics = { workspace = true }
ruff_linter = { path = "../ruff_linter", features = ["clap"] } ruff_linter = { workspace = true, features = ["clap"] }
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
ruff_notebook = { path = "../ruff_notebook" } ruff_notebook = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_formatter = { path = "../ruff_python_formatter" } ruff_python_formatter = { workspace = true }
ruff_server = { path = "../ruff_server" } ruff_server = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
ruff_workspace = { path = "../ruff_workspace" } ruff_workspace = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
argfile = { workspace = true } argfile = { workspace = true }
@ -60,7 +60,7 @@ wild = { workspace = true }
[dev-dependencies] [dev-dependencies]
# Enable test rules during development # Enable test rules during development
ruff_linter = { path = "../ruff_linter", features = ["clap", "test-rules"] } ruff_linter = { workspace = true, features = ["clap", "test-rules"] }
# Avoid writing colored snapshots when running tests from the terminal # Avoid writing colored snapshots when running tests from the terminal
colored = { workspace = true, features = ["no-color"] } colored = { workspace = true, features = ["no-color"] }
insta = { workspace = true, features = ["filters", "json"] } insta = { workspace = true, features = ["filters", "json"] }

View file

@ -38,14 +38,14 @@ serde_json = { workspace = true }
url = { workspace = true } url = { workspace = true }
ureq = { workspace = true } ureq = { workspace = true }
criterion = { workspace = true, default-features = false } criterion = { workspace = true, default-features = false }
codspeed-criterion-compat = { workspace = true, default-features = false, optional = true} codspeed-criterion-compat = { workspace = true, default-features = false, optional = true }
[dev-dependencies] [dev-dependencies]
ruff_linter = { path = "../ruff_linter" } ruff_linter = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_formatter = { path = "../ruff_python_formatter" } ruff_python_formatter = { workspace = true }
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
[lints] [lints]
workspace = true workspace = true

View file

@ -19,7 +19,7 @@ filetime = { workspace = true }
seahash = { workspace = true } seahash = { workspace = true }
[dev-dependencies] [dev-dependencies]
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
[lints] [lints]
workspace = true workspace = true

View file

@ -11,18 +11,18 @@ repository = { workspace = true }
license = { workspace = true } license = { workspace = true }
[dependencies] [dependencies]
ruff = { path = "../ruff" } ruff = { workspace = true }
ruff_diagnostics = { path = "../ruff_diagnostics" } ruff_diagnostics = { workspace = true }
ruff_formatter = { path = "../ruff_formatter" } ruff_formatter = { workspace = true }
ruff_linter = { path = "../ruff_linter", features = ["schemars"] } ruff_linter = { workspace = true, features = ["schemars"] }
ruff_notebook = { path = "../ruff_notebook" } ruff_notebook = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_codegen = { path = "../ruff_python_codegen" } ruff_python_codegen = { workspace = true }
ruff_python_formatter = { path = "../ruff_python_formatter" } ruff_python_formatter = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_python_stdlib = { path = "../ruff_python_stdlib" } ruff_python_stdlib = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_workspace = { path = "../ruff_workspace", features = ["schemars"] } ruff_workspace = { workspace = true, features = ["schemars"] }
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true, features = ["wrap_help"] } clap = { workspace = true, features = ["wrap_help"] }

View file

@ -14,7 +14,7 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
log = { workspace = true } log = { workspace = true }

View file

@ -11,9 +11,9 @@ repository = { workspace = true }
license = { workspace = true } license = { workspace = true }
[dependencies] [dependencies]
ruff_cache = { path = "../ruff_cache" } ruff_cache = { workspace = true }
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
drop_bomb = { workspace = true } drop_bomb = { workspace = true }
rustc-hash = { workspace = true } rustc-hash = { workspace = true }

View file

@ -14,7 +14,7 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
[dev-dependencies] [dev-dependencies]
static_assertions = { workspace = true } static_assertions = { workspace = true }

View file

@ -13,20 +13,20 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_cache = { path = "../ruff_cache" } ruff_cache = { workspace = true }
ruff_diagnostics = { path = "../ruff_diagnostics", features = ["serde"] } ruff_diagnostics = { workspace = true, features = ["serde"] }
ruff_notebook = { path = "../ruff_notebook" } ruff_notebook = { workspace = true }
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast", features = ["serde"] } ruff_python_ast = { workspace = true, features = ["serde"] }
ruff_python_codegen = { path = "../ruff_python_codegen" } ruff_python_codegen = { workspace = true }
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { workspace = true }
ruff_python_literal = { path = "../ruff_python_literal" } ruff_python_literal = { workspace = true }
ruff_python_semantic = { path = "../ruff_python_semantic" } ruff_python_semantic = { workspace = true }
ruff_python_stdlib = { path = "../ruff_python_stdlib" } ruff_python_stdlib = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_source_file = { path = "../ruff_source_file", features = ["serde"] } ruff_source_file = { workspace = true, features = ["serde"] }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
aho-corasick = { workspace = true } aho-corasick = { workspace = true }
annotate-snippets = { workspace = true, features = ["color"] } annotate-snippets = { workspace = true, features = ["color"] }

View file

@ -15,7 +15,7 @@ proc-macro = true
doctest = false doctest = false
[dependencies] [dependencies]
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
proc-macro2 = { workspace = true } proc-macro2 = { workspace = true }
quote = { workspace = true } quote = { workspace = true }

View file

@ -14,9 +14,9 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_diagnostics = { path = "../ruff_diagnostics" } ruff_diagnostics = { workspace = true }
ruff_source_file = { path = "../ruff_source_file", features = ["serde"] } ruff_source_file = { workspace = true, features = ["serde"] }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
itertools = { workspace = true } itertools = { workspace = true }

View file

@ -13,9 +13,9 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
aho-corasick = { workspace = true } aho-corasick = { workspace = true }
bitflags = { workspace = true } bitflags = { workspace = true }

View file

@ -12,10 +12,10 @@ license.workspace = true
[dependencies] [dependencies]
[dev-dependencies] [dev-dependencies]
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
insta = { workspace = true } insta = { workspace = true }

View file

@ -14,10 +14,10 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_literal = { path = "../ruff_python_literal" } ruff_python_literal = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
once_cell = { workspace = true } once_cell = { workspace = true }

View file

@ -14,15 +14,15 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_cache = { path = "../ruff_cache" } ruff_cache = { workspace = true }
ruff_formatter = { path = "../ruff_formatter" } ruff_formatter = { workspace = true }
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
clap = { workspace = true } clap = { workspace = true }
@ -41,7 +41,7 @@ tracing = { workspace = true }
unicode-width = { workspace = true } unicode-width = { workspace = true }
[dev-dependencies] [dev-dependencies]
ruff_formatter = { path = "../ruff_formatter" } ruff_formatter = { workspace = true }
insta = { workspace = true, features = ["glob"] } insta = { workspace = true, features = ["glob"] }
regex = { workspace = true } regex = { workspace = true }

View file

@ -14,11 +14,11 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
[dev-dependencies] [dev-dependencies]

View file

@ -15,7 +15,7 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
bitflags = { workspace = true } bitflags = { workspace = true }
hexf-parse = { workspace = true } hexf-parse = { workspace = true }

View file

@ -13,8 +13,8 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
bitflags = { workspace = true } bitflags = { workspace = true }
@ -29,7 +29,7 @@ unicode_names2 = { workspace = true }
unicode-normalization = { workspace = true } unicode-normalization = { workspace = true }
[dev-dependencies] [dev-dependencies]
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
annotate-snippets = { workspace = true } annotate-snippets = { workspace = true }
insta = { workspace = true, features = ["glob"] } insta = { workspace = true, features = ["glob"] }

View file

@ -14,18 +14,18 @@ license = { workspace = true }
doctest = false doctest = false
[dependencies] [dependencies]
ruff_index = { path = "../ruff_index" } ruff_index = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_stdlib = { path = "../ruff_python_stdlib" } ruff_python_stdlib = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
bitflags = { workspace = true } bitflags = { workspace = true }
is-macro = { workspace = true } is-macro = { workspace = true }
rustc-hash = { workspace = true } rustc-hash = { workspace = true }
[dev-dependencies] [dev-dependencies]
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
[lints] [lints]
workspace = true workspace = true

View file

@ -13,8 +13,8 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
itertools = { workspace = true } itertools = { workspace = true }
unicode-ident = { workspace = true } unicode-ident = { workspace = true }

View file

@ -12,11 +12,11 @@ license.workspace = true
[dependencies] [dependencies]
[dev-dependencies] [dev-dependencies]
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
insta = { workspace = true } insta = { workspace = true }

View file

@ -13,17 +13,17 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_diagnostics = { path = "../ruff_diagnostics" } ruff_diagnostics = { workspace = true }
ruff_formatter = { path = "../ruff_formatter" } ruff_formatter = { workspace = true }
ruff_linter = { path = "../ruff_linter" } ruff_linter = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_codegen = { path = "../ruff_python_codegen" } ruff_python_codegen = { workspace = true }
ruff_python_formatter = { path = "../ruff_python_formatter" } ruff_python_formatter = { workspace = true }
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
ruff_workspace = { path = "../ruff_workspace" } ruff_workspace = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
crossbeam = { workspace = true } crossbeam = { workspace = true }

View file

@ -13,7 +13,7 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
memchr = { workspace = true } memchr = { workspace = true }
once_cell = { workspace = true } once_cell = { workspace = true }

View file

@ -19,17 +19,17 @@ doctest = false
default = ["console_error_panic_hook"] default = ["console_error_panic_hook"]
[dependencies] [dependencies]
ruff_linter = { path = "../ruff_linter" } ruff_linter = { workspace = true }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_python_codegen = { path = "../ruff_python_codegen" } ruff_python_codegen = { workspace = true }
ruff_formatter = { path = "../ruff_formatter" } ruff_formatter = { workspace = true }
ruff_python_formatter = { path = "../ruff_python_formatter" } ruff_python_formatter = { workspace = true }
ruff_python_index = { path = "../ruff_python_index" } ruff_python_index = { workspace = true }
ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_parser = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_text_size = { path = "../ruff_text_size" } ruff_text_size = { workspace = true }
ruff_python_trivia = { path = "../ruff_python_trivia" } ruff_python_trivia = { workspace = true }
ruff_workspace = { path = "../ruff_workspace" } ruff_workspace = { workspace = true }
console_error_panic_hook = { workspace = true, optional = true } console_error_panic_hook = { workspace = true, optional = true }
console_log = { workspace = true } console_log = { workspace = true }

View file

@ -13,13 +13,13 @@ license = { workspace = true }
[lib] [lib]
[dependencies] [dependencies]
ruff_linter = { path = "../ruff_linter" } ruff_linter = { workspace = true }
ruff_formatter = { path = "../ruff_formatter" } ruff_formatter = { workspace = true }
ruff_python_formatter = { path = "../ruff_python_formatter", features = ["serde"] } ruff_python_formatter = { workspace = true, features = ["serde"] }
ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_ast = { workspace = true }
ruff_source_file = { path = "../ruff_source_file" } ruff_source_file = { workspace = true }
ruff_cache = { path = "../ruff_cache" } ruff_cache = { workspace = true }
ruff_macros = { path = "../ruff_macros" } ruff_macros = { workspace = true }
anyhow = { workspace = true } anyhow = { workspace = true }
colored = { workspace = true } colored = { workspace = true }
@ -44,7 +44,7 @@ toml = { workspace = true }
[dev-dependencies] [dev-dependencies]
# Enable test rules during development # Enable test rules during development
ruff_linter = { path = "../ruff_linter", features = ["clap", "test-rules"] } ruff_linter = { workspace = true, features = ["clap", "test-rules"] }
tempfile = { workspace = true } tempfile = { workspace = true }
[package.metadata.cargo-shear] [package.metadata.cargo-shear]