From a2e0ff57c31bd82dffbcde8696bbe0dda54a77aa Mon Sep 17 00:00:00 2001 From: Matthew Mckee Date: Fri, 2 Jan 2026 19:58:15 +0000 Subject: [PATCH] Run `cargo sort` (#22310) --- Cargo.toml | 42 +++++---- crates/ruff/Cargo.toml | 26 ++--- crates/ruff_annotate_snippets/Cargo.toml | 9 +- crates/ruff_benchmark/Cargo.toml | 94 +++++++++---------- crates/ruff_cache/Cargo.toml | 2 +- crates/ruff_db/Cargo.toml | 6 +- crates/ruff_dev/Cargo.toml | 8 +- crates/ruff_formatter/Cargo.toml | 8 +- crates/ruff_graph/Cargo.toml | 8 +- crates/ruff_linter/Cargo.toml | 12 +-- crates/ruff_macros/Cargo.toml | 2 +- crates/ruff_notebook/Cargo.toml | 2 +- crates/ruff_python_ast/Cargo.toml | 13 +-- .../Cargo.toml | 2 +- crates/ruff_python_formatter/Cargo.toml | 26 ++--- crates/ruff_python_parser/Cargo.toml | 10 +- crates/ruff_python_semantic/Cargo.toml | 10 +- crates/ruff_python_trivia/Cargo.toml | 2 +- crates/ruff_server/Cargo.toml | 6 +- crates/ruff_text_size/Cargo.toml | 2 +- crates/ruff_wasm/Cargo.toml | 14 +-- crates/ruff_workspace/Cargo.toml | 12 +-- crates/ty/Cargo.toml | 12 +-- crates/ty_ide/Cargo.toml | 2 +- crates/ty_module_resolver/Cargo.toml | 4 +- crates/ty_project/Cargo.toml | 4 +- crates/ty_python_semantic/Cargo.toml | 24 ++--- crates/ty_server/Cargo.toml | 8 +- crates/ty_static/Cargo.toml | 6 +- crates/ty_test/Cargo.toml | 8 +- crates/ty_wasm/Cargo.toml | 18 ++-- 31 files changed, 200 insertions(+), 202 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a89789fc43..f85194d486 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,8 +58,8 @@ anstream = { version = "0.6.18" } anstyle = { version = "1.0.10" } anyhow = { version = "1.0.80" } arc-swap = { version = "1.7.1" } -assert_fs = { version = "1.1.0" } argfile = { version = "0.2.0" } +assert_fs = { version = "1.1.0" } bincode = { version = "2.0.0" } bitflags = { version = "2.5.0" } bitvec = { version = "1.0.1", default-features = false, features = [ @@ -71,30 +71,30 @@ camino = { version = "1.1.7" } clap = { version = "4.5.3", features = ["derive"] } clap_complete_command = { version = "0.6.0" } clearscreen = { version = "4.0.0" } -csv = { version = "1.3.1" } -divan = { package = "codspeed-divan-compat", version = "4.0.4" } codspeed-criterion-compat = { version = "4.0.4", default-features = false } colored = { version = "3.0.0" } +compact_str = "0.9.0" console_error_panic_hook = { version = "0.1.7" } console_log = { version = "1.0.0" } countme = { version = "3.0.1" } -compact_str = "0.9.0" criterion = { version = "0.8.0", default-features = false } crossbeam = { version = "0.8.4" } +csv = { version = "1.3.1" } dashmap = { version = "6.0.1" } datatest-stable = { version = "0.3.3" } -dunce = { version = "1.0.5" } +divan = { package = "codspeed-divan-compat", version = "4.0.4" } drop_bomb = { version = "0.1.5" } +dunce = { version = "1.0.5" } etcetera = { version = "0.11.0" } fern = { version = "0.7.0" } filetime = { version = "0.2.23" } -getrandom = { version = "0.3.1" } get-size2 = { version = "0.7.3", features = [ "derive", "smallvec", "hashbrown", "compact-str", ] } +getrandom = { version = "0.3.1" } glob = { version = "0.3.1" } globset = { version = "0.4.14" } globwalk = { version = "0.9.1" } @@ -116,8 +116,8 @@ is-macro = { version = "0.3.5" } is-wsl = { version = "0.4.0" } itertools = { version = "0.14.0" } jiff = { version = "0.2.0" } -js-sys = { version = "0.3.69" } jod-thread = { version = "1.0.0" } +js-sys = { version = "0.3.69" } libc = { version = "0.2.153" } libcst = { version = "1.8.4", default-features = false } log = { version = "0.4.17" } @@ -138,9 +138,9 @@ pep440_rs = { version = "0.7.1" } pretty_assertions = "1.3.0" proc-macro2 = { version = "1.0.79" } pyproject-toml = { version = "0.13.4" } -quickcheck = { version = "1.0.3", default-features = false} -quickcheck_macros = { version = "1.0.0" } quick-junit = { version = "0.5.0" } +quickcheck = { version = "1.0.3", default-features = false } +quickcheck_macros = { version = "1.0.0" } quote = { version = "1.0.23" } rand = { version = "0.9.0" } rayon = { version = "1.10.0" } @@ -197,9 +197,9 @@ tryfn = { version = "0.2.1" } typed-arena = { version = "2.0.2" } unic-ucd-category = { version = "0.9" } unicode-ident = { version = "1.0.12" } +unicode-normalization = { version = "0.1.23" } unicode-width = { version = "0.2.0" } unicode_names2 = { version = "1.2.2" } -unicode-normalization = { version = "0.1.23" } url = { version = "2.5.0" } uuid = { version = "1.6.1", features = ["v4", "fast-rng", "macro-diagnostics"] } walkdir = { version = "2.3.2" } @@ -209,8 +209,13 @@ wild = { version = "2" } zip = { version = "0.6.6", default-features = false } [workspace.metadata.cargo-shear] -ignored = ["getrandom", "ruff_options_metadata", "uuid", "get-size2", "ty_completion_eval"] - +ignored = [ + "getrandom", + "ruff_options_metadata", + "uuid", + "get-size2", + "ty_completion_eval", +] [workspace.lints.rust] unsafe_code = "warn" @@ -270,17 +275,10 @@ if_not_else = "allow" # Diagnostics are not actionable: Enable once https://github.com/rust-lang/rust-clippy/issues/13774 is resolved. large_stack_arrays = "allow" - [profile.release] lto = "fat" codegen-units = 16 -# Profile to build a minimally sized binary for ruff/ty -[profile.minimal-size] -inherits = "release" -opt-level = "z" -codegen-units = 1 - # Some crates don't change as much but benefit more from # more expensive optimization passes, so we selectively # decrease codegen-units in some cases. @@ -291,6 +289,12 @@ codegen-units = 1 [profile.release.package.salsa] codegen-units = 1 +# Profile to build a minimally sized binary for ruff/ty +[profile.minimal-size] +inherits = "release" +opt-level = "z" +codegen-units = 1 + [profile.dev.package.insta] opt-level = 3 diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index 3cec346c16..d0769d2cff 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -12,6 +12,13 @@ license = { workspace = true } readme = "../../README.md" default-run = "ruff" +[package.metadata.cargo-shear] +# Used via macro expansion. +ignored = ["jiff"] + +[package.metadata.dist] +dist = true + [dependencies] ruff_cache = { workspace = true } ruff_db = { workspace = true, default-features = false, features = ["os"] } @@ -61,6 +68,12 @@ tracing = { workspace = true, features = ["log"] } walkdir = { workspace = true } wild = { workspace = true } +[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies] +tikv-jemallocator = { workspace = true } + +[target.'cfg(target_os = "windows")'.dependencies] +mimalloc = { workspace = true } + [dev-dependencies] # Enable test rules during development ruff_linter = { workspace = true, features = ["clap", "test-rules"] } @@ -76,18 +89,5 @@ ruff_python_trivia = { workspace = true } tempfile = { workspace = true } test-case = { workspace = true } -[package.metadata.cargo-shear] -# Used via macro expansion. -ignored = ["jiff"] - -[package.metadata.dist] -dist = true - -[target.'cfg(target_os = "windows")'.dependencies] -mimalloc = { workspace = true } - -[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies] -tikv-jemallocator = { workspace = true } - [lints] workspace = true diff --git a/crates/ruff_annotate_snippets/Cargo.toml b/crates/ruff_annotate_snippets/Cargo.toml index 7352430948..91b9e28baf 100644 --- a/crates/ruff_annotate_snippets/Cargo.toml +++ b/crates/ruff_annotate_snippets/Cargo.toml @@ -12,10 +12,6 @@ license = "MIT OR Apache-2.0" [lib] -[features] -default = [] -testing-colors = [] - [dependencies] anstyle = { workspace = true } memchr = { workspace = true } @@ -23,12 +19,17 @@ unicode-width = { workspace = true } [dev-dependencies] ruff_annotate_snippets = { workspace = true, features = ["testing-colors"] } + anstream = { workspace = true } serde = { workspace = true, features = ["derive"] } snapbox = { workspace = true, features = ["diff", "term-svg", "cmd", "examples"] } toml = { workspace = true } tryfn = { workspace = true } +[features] +default = [] +testing-colors = [] + [[test]] name = "fixtures" harness = false diff --git a/crates/ruff_benchmark/Cargo.toml b/crates/ruff_benchmark/Cargo.toml index 2a86fff739..760aed7b1e 100644 --- a/crates/ruff_benchmark/Cargo.toml +++ b/crates/ruff_benchmark/Cargo.toml @@ -16,6 +16,51 @@ bench = false test = false doctest = false +[dependencies] +ruff_db = { workspace = true, features = ["testing"] } +ruff_linter = { workspace = true, optional = true } +ruff_python_ast = { workspace = true } +ruff_python_formatter = { workspace = true, optional = true } +ruff_python_parser = { workspace = true, optional = true } +ruff_python_trivia = { workspace = true, optional = true } +ty_project = { workspace = true, optional = true } + +anyhow = { workspace = true } +codspeed-criterion-compat = { workspace = true, default-features = false, optional = true } +criterion = { workspace = true, default-features = false, optional = true } +divan = { workspace = true, optional = true } +serde = { workspace = true } +serde_json = { workspace = true } +tracing = { workspace = true } + +[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies] +tikv-jemallocator = { workspace = true, optional = true } + +[target.'cfg(target_os = "windows")'.dependencies] +mimalloc = { workspace = true, optional = true } + +[dev-dependencies] +rayon = { workspace = true } +rustc-hash = { workspace = true } + +[features] +default = ["ty_instrumented", "ty_walltime", "ruff_instrumented"] +# Enables the ruff instrumented benchmarks +ruff_instrumented = [ + "criterion", + "ruff_linter", + "ruff_python_formatter", + "ruff_python_parser", + "ruff_python_trivia", + "mimalloc", + "tikv-jemallocator", +] +# Enables the ty instrumented benchmarks +ty_instrumented = ["criterion", "ty_project", "ruff_python_trivia"] +codspeed = ["codspeed-criterion-compat"] +# Enables the ty_walltime benchmarks +ty_walltime = ["ruff_db/os", "ty_project", "divan"] + [[bench]] name = "linter" harness = false @@ -46,54 +91,5 @@ name = "ty_walltime" harness = false required-features = ["ty_walltime"] -[dependencies] -ruff_db = { workspace = true, features = ["testing"] } -ruff_python_ast = { workspace = true } -ruff_linter = { workspace = true, optional = true } -ruff_python_formatter = { workspace = true, optional = true } -ruff_python_parser = { workspace = true, optional = true } -ruff_python_trivia = { workspace = true, optional = true } -ty_project = { workspace = true, optional = true } - -divan = { workspace = true, optional = true } -anyhow = { workspace = true } -codspeed-criterion-compat = { workspace = true, default-features = false, optional = true } -criterion = { workspace = true, default-features = false, optional = true } -serde = { workspace = true } -serde_json = { workspace = true } -tracing = { workspace = true } - [lints] workspace = true - -[features] -default = ["ty_instrumented", "ty_walltime", "ruff_instrumented"] -# Enables the ruff instrumented benchmarks -ruff_instrumented = [ - "criterion", - "ruff_linter", - "ruff_python_formatter", - "ruff_python_parser", - "ruff_python_trivia", - "mimalloc", - "tikv-jemallocator", -] -# Enables the ty instrumented benchmarks -ty_instrumented = [ - "criterion", - "ty_project", - "ruff_python_trivia", -] -codspeed = ["codspeed-criterion-compat"] -# Enables the ty_walltime benchmarks -ty_walltime = ["ruff_db/os", "ty_project", "divan"] - -[target.'cfg(target_os = "windows")'.dependencies] -mimalloc = { workspace = true, optional = true } - -[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies] -tikv-jemallocator = { workspace = true, optional = true } - -[dev-dependencies] -rustc-hash = { workspace = true } -rayon = { workspace = true } diff --git a/crates/ruff_cache/Cargo.toml b/crates/ruff_cache/Cargo.toml index cc44bc4188..c8788dbc8b 100644 --- a/crates/ruff_cache/Cargo.toml +++ b/crates/ruff_cache/Cargo.toml @@ -11,11 +11,11 @@ repository = { workspace = true } license = { workspace = true } [dependencies] +filetime = { workspace = true } glob = { workspace = true } globset = { workspace = true } itertools = { workspace = true } regex = { workspace = true } -filetime = { workspace = true } seahash = { workspace = true } [dev-dependencies] diff --git a/crates/ruff_db/Cargo.toml b/crates/ruff_db/Cargo.toml index e8af17971d..6c5f4a0ebc 100644 --- a/crates/ruff_db/Cargo.toml +++ b/crates/ruff_db/Cargo.toml @@ -48,12 +48,12 @@ tracing = { workspace = true } tracing-subscriber = { workspace = true, optional = true } zip = { workspace = true } -[target.'cfg(target_arch="wasm32")'.dependencies] -web-time = { version = "1.1.0" } - [target.'cfg(not(target_arch="wasm32"))'.dependencies] etcetera = { workspace = true, optional = true } +[target.'cfg(target_arch="wasm32")'.dependencies] +web-time = { version = "1.1.0" } + [dev-dependencies] insta = { workspace = true, features = ["filters"] } tempfile = { workspace = true } diff --git a/crates/ruff_dev/Cargo.toml b/crates/ruff_dev/Cargo.toml index 17d494e4a7..2cc6c3997f 100644 --- a/crates/ruff_dev/Cargo.toml +++ b/crates/ruff_dev/Cargo.toml @@ -11,10 +11,6 @@ repository = { workspace = true } license = { workspace = true } [dependencies] -ty = { workspace = true } -ty_project = { workspace = true, features = ["schemars"] } -ty_python_semantic = { workspace = true } -ty_static = { workspace = true } ruff = { workspace = true } ruff_formatter = { workspace = true } ruff_linter = { workspace = true, features = ["schemars"] } @@ -26,6 +22,10 @@ ruff_python_formatter = { workspace = true } ruff_python_parser = { workspace = true } ruff_python_trivia = { workspace = true } ruff_workspace = { workspace = true, features = ["schemars"] } +ty = { workspace = true } +ty_project = { workspace = true, features = ["schemars"] } +ty_python_semantic = { workspace = true } +ty_static = { workspace = true } anyhow = { workspace = true } clap = { workspace = true, features = ["wrap_help"] } diff --git a/crates/ruff_formatter/Cargo.toml b/crates/ruff_formatter/Cargo.toml index 79945c75ca..daa534c0d8 100644 --- a/crates/ruff_formatter/Cargo.toml +++ b/crates/ruff_formatter/Cargo.toml @@ -10,6 +10,10 @@ documentation = { workspace = true } repository = { workspace = true } license = { workspace = true } +[package.metadata.cargo-shear] +# Used via `CacheKey` macro expansion. +ignored = ["ruff_cache"] + [dependencies] ruff_cache = { workspace = true } ruff_macros = { workspace = true } @@ -25,10 +29,6 @@ unicode-width = { workspace = true } [dev-dependencies] -[package.metadata.cargo-shear] -# Used via `CacheKey` macro expansion. -ignored = ["ruff_cache"] - [features] serde = ["dep:serde", "ruff_text_size/serde"] schemars = ["dep:schemars", "ruff_text_size/schemars"] diff --git a/crates/ruff_graph/Cargo.toml b/crates/ruff_graph/Cargo.toml index 259bfc7dfd..d2d36a4236 100644 --- a/crates/ruff_graph/Cargo.toml +++ b/crates/ruff_graph/Cargo.toml @@ -9,6 +9,10 @@ repository.workspace = true authors.workspace = true license.workspace = true +[package.metadata.cargo-shear] +# Used via `CacheKey` macro expansion. +ignored = ["ruff_cache"] + [dependencies] ruff_cache = { workspace = true } ruff_db = { workspace = true, features = ["os", "serde"] } @@ -29,7 +33,3 @@ zip = { workspace = true, features = [] } [lints] workspace = true - -[package.metadata.cargo-shear] -# Used via `CacheKey` macro expansion. -ignored = ["ruff_cache"] diff --git a/crates/ruff_linter/Cargo.toml b/crates/ruff_linter/Cargo.toml index e39217ebd3..d19aebce95 100644 --- a/crates/ruff_linter/Cargo.toml +++ b/crates/ruff_linter/Cargo.toml @@ -16,17 +16,17 @@ license = { workspace = true } ruff_cache = { workspace = true } ruff_db = { workspace = true, features = ["junit", "serde"] } ruff_diagnostics = { workspace = true, features = ["serde"] } -ruff_notebook = { workspace = true } ruff_macros = { workspace = true } +ruff_notebook = { workspace = true } ruff_python_ast = { workspace = true, features = ["serde", "cache"] } ruff_python_codegen = { workspace = true } ruff_python_importer = { workspace = true } ruff_python_index = { workspace = true } ruff_python_literal = { workspace = true } +ruff_python_parser = { workspace = true } ruff_python_semantic = { workspace = true } ruff_python_stdlib = { workspace = true } ruff_python_trivia = { workspace = true } -ruff_python_parser = { workspace = true } ruff_source_file = { workspace = true, features = ["serde"] } ruff_text_size = { workspace = true } @@ -44,8 +44,8 @@ imperative = { workspace = true } is-macro = { workspace = true } is-wsl = { workspace = true } itertools = { workspace = true } -libcst = { workspace = true } jiff = { workspace = true } +libcst = { workspace = true } log = { workspace = true } memchr = { workspace = true } natord = { workspace = true } @@ -67,17 +67,17 @@ strum_macros = { workspace = true } thiserror = { workspace = true } toml = { workspace = true } typed-arena = { workspace = true } +unicode-normalization = { workspace = true } unicode-width = { workspace = true } unicode_names2 = { workspace = true } -unicode-normalization = { workspace = true } url = { workspace = true } [dev-dependencies] -insta = { workspace = true, features = ["filters", "json", "redactions"] } -test-case = { workspace = true } # Disable colored output in tests colored = { workspace = true, features = ["no-color"] } +insta = { workspace = true, features = ["filters", "json", "redactions"] } tempfile = { workspace = true } +test-case = { workspace = true } [features] default = [] diff --git a/crates/ruff_macros/Cargo.toml b/crates/ruff_macros/Cargo.toml index 7e72d59855..58e9892ed2 100644 --- a/crates/ruff_macros/Cargo.toml +++ b/crates/ruff_macros/Cargo.toml @@ -18,10 +18,10 @@ doctest = false ruff_python_trivia = { workspace = true } heck = { workspace = true } +itertools = { workspace = true } proc-macro2 = { workspace = true } quote = { workspace = true } syn = { workspace = true, features = ["derive", "parsing", "extra-traits", "full"] } -itertools = { workspace = true } [lints] workspace = true diff --git a/crates/ruff_notebook/Cargo.toml b/crates/ruff_notebook/Cargo.toml index c8273399ed..636efd402a 100644 --- a/crates/ruff_notebook/Cargo.toml +++ b/crates/ruff_notebook/Cargo.toml @@ -20,12 +20,12 @@ ruff_text_size = { workspace = true } anyhow = { workspace = true } itertools = { workspace = true } +rand = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } serde_with = { workspace = true, default-features = false, features = ["macros"] } thiserror = { workspace = true } uuid = { workspace = true } -rand = { workspace = true } [dev-dependencies] test-case = { workspace = true } diff --git a/crates/ruff_python_ast/Cargo.toml b/crates/ruff_python_ast/Cargo.toml index 062870d3e4..b6f0433a56 100644 --- a/crates/ruff_python_ast/Cargo.toml +++ b/crates/ruff_python_ast/Cargo.toml @@ -10,6 +10,10 @@ documentation = { workspace = true } repository = { workspace = true } license = { workspace = true } +[package.metadata.cargo-shear] +# Used via `CacheKey` macro expansion. +ignored = ["ruff_cache"] + [lib] [dependencies] @@ -42,14 +46,7 @@ serde = [ "dep:ruff_cache", "compact_str/serde", ] -get-size = [ - "dep:get-size2", - "ruff_text_size/get-size" -] +get-size = ["dep:get-size2", "ruff_text_size/get-size"] [lints] workspace = true - -[package.metadata.cargo-shear] -# Used via `CacheKey` macro expansion. -ignored = ["ruff_cache"] diff --git a/crates/ruff_python_ast_integration_tests/Cargo.toml b/crates/ruff_python_ast_integration_tests/Cargo.toml index e4dbbb9a56..b115d712a5 100644 --- a/crates/ruff_python_ast_integration_tests/Cargo.toml +++ b/crates/ruff_python_ast_integration_tests/Cargo.toml @@ -12,8 +12,8 @@ license.workspace = true [dependencies] [dev-dependencies] -ruff_python_parser = { workspace = true } ruff_python_ast = { workspace = true } +ruff_python_parser = { workspace = true } ruff_python_trivia = { workspace = true } ruff_text_size = { workspace = true } diff --git a/crates/ruff_python_formatter/Cargo.toml b/crates/ruff_python_formatter/Cargo.toml index d285f88d22..52bc2dd247 100644 --- a/crates/ruff_python_formatter/Cargo.toml +++ b/crates/ruff_python_formatter/Cargo.toml @@ -10,6 +10,10 @@ documentation = { workspace = true } repository = { workspace = true } license = { workspace = true } +[package.metadata.cargo-shear] +# Used via `CacheKey` macro expansion. +ignored = ["ruff_cache"] + [lib] doctest = false @@ -18,10 +22,10 @@ ruff_cache = { workspace = true } ruff_db = { workspace = true } ruff_formatter = { workspace = true } ruff_macros = { workspace = true } -ruff_python_trivia = { workspace = true } -ruff_source_file = { workspace = true } ruff_python_ast = { workspace = true } ruff_python_parser = { workspace = true } +ruff_python_trivia = { workspace = true } +ruff_source_file = { workspace = true } ruff_text_size = { workspace = true } anyhow = { workspace = true } @@ -32,8 +36,8 @@ memchr = { workspace = true } regex = { workspace = true } rustc-hash = { workspace = true } salsa = { workspace = true } -serde = { workspace = true, optional = true } schemars = { workspace = true, optional = true } +serde = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } smallvec = { workspace = true } static_assertions = { workspace = true } @@ -50,16 +54,6 @@ serde = { workspace = true } serde_json = { workspace = true } similar = { workspace = true } -[package.metadata.cargo-shear] -# Used via `CacheKey` macro expansion. -ignored = ["ruff_cache"] - -[[test]] -name = "fixtures" -harness = false -test = true -required-features = ["serde"] - [features] default = ["serde"] serde = [ @@ -70,5 +64,11 @@ serde = [ ] schemars = ["dep:schemars", "dep:serde_json", "ruff_formatter/schemars"] +[[test]] +name = "fixtures" +harness = false +test = true +required-features = ["serde"] + [lints] workspace = true diff --git a/crates/ruff_python_parser/Cargo.toml b/crates/ruff_python_parser/Cargo.toml index 579882ee5e..4e29658f2b 100644 --- a/crates/ruff_python_parser/Cargo.toml +++ b/crates/ruff_python_parser/Cargo.toml @@ -12,10 +12,6 @@ license = { workspace = true } [lib] -[[test]] -name = "fixtures" -harness = false - [dependencies] ruff_python_ast = { workspace = true, features = ["get-size"] } ruff_python_trivia = { workspace = true } @@ -29,8 +25,8 @@ memchr = { workspace = true } rustc-hash = { workspace = true } static_assertions = { workspace = true } unicode-ident = { workspace = true } -unicode_names2 = { workspace = true } unicode-normalization = { workspace = true } +unicode_names2 = { workspace = true } [dev-dependencies] ruff_annotate_snippets = { workspace = true } @@ -45,5 +41,9 @@ serde = { workspace = true } serde_json = { workspace = true } walkdir = { workspace = true } +[[test]] +name = "fixtures" +harness = false + [lints] workspace = true diff --git a/crates/ruff_python_semantic/Cargo.toml b/crates/ruff_python_semantic/Cargo.toml index 8005ec824f..530635455d 100644 --- a/crates/ruff_python_semantic/Cargo.toml +++ b/crates/ruff_python_semantic/Cargo.toml @@ -10,6 +10,10 @@ documentation = { workspace = true } repository = { workspace = true } license = { workspace = true } +[package.metadata.cargo-shear] +# Used via `CacheKey` macro expansion. +ignored = ["ruff_cache"] + [dependencies] ruff_cache = { workspace = true } ruff_index = { workspace = true } @@ -28,12 +32,8 @@ smallvec = { workspace = true } [dev-dependencies] insta = { workspace = true, features = ["filters", "json", "redactions"] } -test-case = { workspace = true } ruff_python_parser = { workspace = true } +test-case = { workspace = true } [lints] workspace = true - -[package.metadata.cargo-shear] -# Used via `CacheKey` macro expansion. -ignored = ["ruff_cache"] diff --git a/crates/ruff_python_trivia/Cargo.toml b/crates/ruff_python_trivia/Cargo.toml index 5e65c6df46..cf9290a35d 100644 --- a/crates/ruff_python_trivia/Cargo.toml +++ b/crates/ruff_python_trivia/Cargo.toml @@ -13,8 +13,8 @@ license = { workspace = true } [lib] [dependencies] -ruff_text_size = { workspace = true } ruff_source_file = { workspace = true } +ruff_text_size = { workspace = true } itertools = { workspace = true } unicode-ident = { workspace = true } diff --git a/crates/ruff_server/Cargo.toml b/crates/ruff_server/Cargo.toml index 0d53439406..06cc0c6815 100644 --- a/crates/ruff_server/Cargo.toml +++ b/crates/ruff_server/Cargo.toml @@ -44,12 +44,12 @@ tracing = { workspace = true } tracing-log = { workspace = true } tracing-subscriber = { workspace = true, features = ["chrono"] } -[dev-dependencies] -insta = { workspace = true } - [target.'cfg(target_vendor = "apple")'.dependencies] libc = { workspace = true } +[dev-dependencies] +insta = { workspace = true } + [features] test-uv = [] diff --git a/crates/ruff_text_size/Cargo.toml b/crates/ruff_text_size/Cargo.toml index d658fe4db3..a7ea1865ee 100644 --- a/crates/ruff_text_size/Cargo.toml +++ b/crates/ruff_text_size/Cargo.toml @@ -11,9 +11,9 @@ repository = { workspace = true } license = { workspace = true } [dependencies] -serde = { workspace = true, optional = true } get-size2 = { workspace = true, optional = true } schemars = { workspace = true, optional = true } +serde = { workspace = true, optional = true } [dev-dependencies] serde_test = { workspace = true } diff --git a/crates/ruff_wasm/Cargo.toml b/crates/ruff_wasm/Cargo.toml index 8292932401..271e907e53 100644 --- a/crates/ruff_wasm/Cargo.toml +++ b/crates/ruff_wasm/Cargo.toml @@ -15,14 +15,11 @@ description = "WebAssembly bindings for Ruff" crate-type = ["cdylib", "rlib"] doctest = false -[features] -default = ["console_error_panic_hook"] - [dependencies] +ruff_formatter = { workspace = true } ruff_linter = { workspace = true } ruff_python_ast = { workspace = true } ruff_python_codegen = { workspace = true } -ruff_formatter = { workspace = true } ruff_python_formatter = { workspace = true } ruff_python_index = { workspace = true } ruff_python_parser = { workspace = true } @@ -33,19 +30,22 @@ ruff_workspace = { workspace = true } console_error_panic_hook = { workspace = true, optional = true } console_log = { workspace = true } -js-sys = { workspace = true } -log = { workspace = true } # Not a direct dependency but required to enable the `wasm_js` feature. # See https://docs.rs/getrandom/latest/getrandom/#webassembly-support getrandom = { workspace = true, features = ["wasm_js"] } +js-sys = { workspace = true } +log = { workspace = true } serde = { workspace = true } serde-wasm-bindgen = { workspace = true } -wasm-bindgen = { workspace = true } # Not a direct dependency but required to compile for Wasm. uuid = { workspace = true, features = ["js"] } +wasm-bindgen = { workspace = true } [dev-dependencies] wasm-bindgen-test = { workspace = true } +[features] +default = ["console_error_panic_hook"] + [lints] workspace = true diff --git a/crates/ruff_workspace/Cargo.toml b/crates/ruff_workspace/Cargo.toml index 9ef114df94..d0d34f2161 100644 --- a/crates/ruff_workspace/Cargo.toml +++ b/crates/ruff_workspace/Cargo.toml @@ -10,6 +10,10 @@ documentation = { workspace = true } repository = { workspace = true } license = { workspace = true } +[package.metadata.cargo-shear] +# Used via macro expansion. +ignored = ["colored"] + [lib] [dependencies] @@ -27,14 +31,14 @@ ruff_source_file = { workspace = true } anyhow = { workspace = true } colored = { workspace = true } +glob = { workspace = true } +globset = { workspace = true } ignore = { workspace = true } indexmap = { workspace = true } is-macro = { workspace = true } itertools = { workspace = true } log = { workspace = true } matchit = { workspace = true } -glob = { workspace = true } -globset = { workspace = true } path-absolutize = { workspace = true } path-slash = { workspace = true } pep440_rs = { workspace = true } @@ -56,10 +60,6 @@ etcetera = { workspace = true } ruff_linter = { workspace = true, features = ["clap", "test-rules"] } tempfile = { workspace = true } -[package.metadata.cargo-shear] -# Used via macro expansion. -ignored = ["colored"] - [features] default = [] schemars = [ diff --git a/crates/ty/Cargo.toml b/crates/ty/Cargo.toml index df466ad8be..4b962179fe 100644 --- a/crates/ty/Cargo.toml +++ b/crates/ty/Cargo.toml @@ -17,8 +17,8 @@ license.workspace = true ruff_db = { workspace = true, features = ["os", "cache"] } ruff_python_ast = { workspace = true } ty_combine = { workspace = true } -ty_python_semantic = { workspace = true } ty_project = { workspace = true, features = ["zstd"] } +ty_python_semantic = { workspace = true } ty_server = { workspace = true } ty_static = { workspace = true } @@ -35,19 +35,22 @@ jiff = { workspace = true } rayon = { workspace = true } salsa = { workspace = true } tracing = { workspace = true, features = ["release_max_level_debug"] } -tracing-subscriber = { workspace = true } tracing-flame = { workspace = true } +tracing-subscriber = { workspace = true } wild = { workspace = true } +[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies] +tikv-jemallocator = { workspace = true } + [dev-dependencies] ruff_db = { workspace = true, features = ["testing"] } ruff_python_trivia = { workspace = true } ty_module_resolver = { workspace = true } dunce = { workspace = true } +filetime = { workspace = true } insta = { workspace = true, features = ["filters"] } insta-cmd = { workspace = true } -filetime = { workspace = true } regex = { workspace = true } tempfile = { workspace = true } toml = { workspace = true } @@ -55,8 +58,5 @@ toml = { workspace = true } [features] default = [] -[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies] -tikv-jemallocator = { workspace = true } - [lints] workspace = true diff --git a/crates/ty_ide/Cargo.toml b/crates/ty_ide/Cargo.toml index c5a4186f29..1e7243a422 100644 --- a/crates/ty_ide/Cargo.toml +++ b/crates/ty_ide/Cargo.toml @@ -23,8 +23,8 @@ ruff_python_trivia = { workspace = true } ruff_source_file = { workspace = true } ruff_text_size = { workspace = true } ty_module_resolver = { workspace = true } -ty_python_semantic = { workspace = true } ty_project = { workspace = true, features = ["testing"] } +ty_python_semantic = { workspace = true } ty_vendored = { workspace = true } get-size2 = { workspace = true } diff --git a/crates/ty_module_resolver/Cargo.toml b/crates/ty_module_resolver/Cargo.toml index e7f16a751a..22adc4599a 100644 --- a/crates/ty_module_resolver/Cargo.toml +++ b/crates/ty_module_resolver/Cargo.toml @@ -21,10 +21,10 @@ compact_str = { workspace = true } get-size2 = { workspace = true } rustc-hash = { workspace = true } salsa = { workspace = true } -thiserror = { workspace = true } -tracing = { workspace = true } strum = { workspace = true } strum_macros = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } [dev-dependencies] ruff_db = { workspace = true, features = ["testing", "os"] } diff --git a/crates/ty_project/Cargo.toml b/crates/ty_project/Cargo.toml index 2373b4f834..33c1762b38 100644 --- a/crates/ty_project/Cargo.toml +++ b/crates/ty_project/Cargo.toml @@ -33,8 +33,8 @@ crossbeam = { workspace = true } get-size2 = { workspace = true } globset = { workspace = true } notify = { workspace = true } -pep440_rs = { workspace = true, features = ["version-ranges"] } ordermap = { workspace = true, features = ["serde"] } +pep440_rs = { workspace = true, features = ["version-ranges"] } rayon = { workspace = true } regex = { workspace = true } regex-automata = { workspace = true } @@ -48,8 +48,8 @@ toml = { workspace = true } tracing = { workspace = true } [dev-dependencies] -ruff_db = { workspace = true, features = ["testing"] } insta = { workspace = true, features = ["redactions", "ron"] } +ruff_db = { workspace = true, features = ["testing"] } [features] default = ["zstd"] diff --git a/crates/ty_python_semantic/Cargo.toml b/crates/ty_python_semantic/Cargo.toml index f0cec69d51..317cffae23 100644 --- a/crates/ty_python_semantic/Cargo.toml +++ b/crates/ty_python_semantic/Cargo.toml @@ -11,21 +11,21 @@ repository = { workspace = true } license = { workspace = true } [dependencies] -ruff_db = { workspace = true } ruff_annotate_snippets = { workspace = true } +ruff_db = { workspace = true } ruff_diagnostics = { workspace = true } ruff_index = { workspace = true, features = ["salsa"] } ruff_macros = { workspace = true } ruff_memory_usage = { workspace = true } ruff_python_ast = { workspace = true, features = ["salsa"] } +ruff_python_literal = { workspace = true } ruff_python_parser = { workspace = true } ruff_python_stdlib = { workspace = true } +ruff_python_trivia = { workspace = true } ruff_source_file = { workspace = true } ruff_text_size = { workspace = true } -ruff_python_literal = { workspace = true } -ruff_python_trivia = { workspace = true } -ty_module_resolver = { workspace = true } ty_combine = { workspace = true } +ty_module_resolver = { workspace = true } ty_static = { workspace = true } anyhow = { workspace = true } @@ -36,24 +36,24 @@ colored = { workspace = true } compact_str = { workspace = true } drop_bomb = { workspace = true } get-size2 = { workspace = true, features = ["indexmap", "ordermap"] } +hashbrown = { workspace = true } indexmap = { workspace = true } itertools = { workspace = true } +memchr = { workspace = true } ordermap = { workspace = true } -salsa = { workspace = true, features = ["compact_str", "ordermap"] } -thiserror = { workspace = true } -tracing = { workspace = true } rustc-hash = { workspace = true } -hashbrown = { workspace = true } +salsa = { workspace = true, features = ["compact_str", "ordermap"] } schemars = { workspace = true, optional = true } serde = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } smallvec = { workspace = true } static_assertions = { workspace = true } -test-case = { workspace = true } -memchr = { workspace = true } +strsim = "0.11.1" strum = { workspace = true } strum_macros = { workspace = true } -strsim = "0.11.1" +test-case = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } [dev-dependencies] ruff_db = { workspace = true, features = ["testing", "os"] } @@ -69,7 +69,7 @@ indoc = { workspace = true } insta = { workspace = true } pretty_assertions = { workspace = true } quickcheck = { workspace = true } -quickcheck_macros = { workspace = true} +quickcheck_macros = { workspace = true } [features] schemars = ["dep:schemars", "dep:serde_json"] diff --git a/crates/ty_server/Cargo.toml b/crates/ty_server/Cargo.toml index df0be9dee9..d3597df57c 100644 --- a/crates/ty_server/Cargo.toml +++ b/crates/ty_server/Cargo.toml @@ -40,15 +40,15 @@ thiserror = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["chrono"] } +[target.'cfg(target_vendor = "apple")'.dependencies] +libc = { workspace = true } + [dev-dependencies] dunce = { workspace = true } insta = { workspace = true, features = ["filters", "json"] } regex = { workspace = true } -tempfile = { workspace = true } smallvec = { workspace = true } - -[target.'cfg(target_vendor = "apple")'.dependencies] -libc = { workspace = true } +tempfile = { workspace = true } [lints] workspace = true diff --git a/crates/ty_static/Cargo.toml b/crates/ty_static/Cargo.toml index 178df9282f..2f7c2c6e5f 100644 --- a/crates/ty_static/Cargo.toml +++ b/crates/ty_static/Cargo.toml @@ -12,8 +12,8 @@ license = { workspace = true } [lib] doctest = false -[lints] -workspace = true - [dependencies] ruff_macros = { workspace = true } + +[lints] +workspace = true diff --git a/crates/ty_test/Cargo.toml b/crates/ty_test/Cargo.toml index ef56b59634..8e8aec9eb5 100644 --- a/crates/ty_test/Cargo.toml +++ b/crates/ty_test/Cargo.toml @@ -15,10 +15,10 @@ ruff_db = { workspace = true, features = ["os", "testing"] } ruff_diagnostics = { workspace = true } ruff_index = { workspace = true } ruff_notebook = { workspace = true } +ruff_python_ast = { workspace = true } ruff_python_trivia = { workspace = true } ruff_source_file = { workspace = true } ruff_text_size = { workspace = true } -ruff_python_ast = { workspace = true } ty_module_resolver = { workspace = true } ty_python_semantic = { workspace = true, features = ["serde", "testing"] } ty_static = { workspace = true } @@ -26,8 +26,8 @@ ty_vendored = { workspace = true } anyhow = { workspace = true } camino = { workspace = true } -dunce = { workspace = true } colored = { workspace = true } +dunce = { workspace = true } insta = { workspace = true, features = ["filters"] } memchr = { workspace = true } path-slash = { workspace = true } @@ -35,12 +35,12 @@ regex = { workspace = true } rustc-hash = { workspace = true } rustc-stable-hash = { workspace = true } salsa = { workspace = true } -smallvec = { workspace = true } serde = { workspace = true } +smallvec = { workspace = true } tempfile = { workspace = true } +thiserror = { workspace = true } toml = { workspace = true } tracing = { workspace = true } -thiserror = { workspace = true } [lints] workspace = true diff --git a/crates/ty_wasm/Cargo.toml b/crates/ty_wasm/Cargo.toml index 770042e501..66fe1d1bdf 100644 --- a/crates/ty_wasm/Cargo.toml +++ b/crates/ty_wasm/Cargo.toml @@ -11,13 +11,14 @@ repository = { workspace = true } license = { workspace = true } description = "WebAssembly bindings for ty" +[package.metadata.cargo-shear] +# Depended on only to enable `log` feature as of 2025-10-03. +ignored = ["tracing"] + [lib] crate-type = ["cdylib", "rlib"] doctest = false -[features] -default = ["console_error_panic_hook"] - [dependencies] ty_ide = { workspace = true } ty_project = { workspace = true, default-features = false, features = [ @@ -35,11 +36,11 @@ ruff_text_size = { workspace = true } console_error_panic_hook = { workspace = true, optional = true } console_log = { workspace = true } -js-sys = { workspace = true } -log = { workspace = true } # Not a direct dependency but required to enable the `wasm_js` feature. # See https://docs.rs/getrandom/latest/getrandom/#webassembly-support getrandom = { workspace = true, features = ["wasm_js"] } +js-sys = { workspace = true } +log = { workspace = true } serde-wasm-bindgen = { workspace = true } tracing = { workspace = true, features = ["log"] } # Not a direct dependency but required to compile for Wasm. @@ -50,9 +51,8 @@ wasm-bindgen = { workspace = true } [dev-dependencies] wasm-bindgen-test = { workspace = true } +[features] +default = ["console_error_panic_hook"] + [lints] workspace = true - -[package.metadata.cargo-shear] -# Depended on only to enable `log` feature as of 2025-10-03. -ignored = ["tracing"]