From a5cbca156ccba18900f95d5597db9ed2935a31d6 Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Thu, 21 Aug 2025 03:26:06 -0400 Subject: [PATCH] Fix rust feature activation (#20012) --- crates/ruff_diagnostics/Cargo.toml | 5 ++++- crates/ruff_source_file/Cargo.toml | 2 +- crates/ruff_workspace/Cargo.toml | 1 + crates/ty_project/Cargo.toml | 7 ++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/crates/ruff_diagnostics/Cargo.toml b/crates/ruff_diagnostics/Cargo.toml index 810364a844..b2241f7423 100644 --- a/crates/ruff_diagnostics/Cargo.toml +++ b/crates/ruff_diagnostics/Cargo.toml @@ -14,8 +14,11 @@ license = { workspace = true } doctest = false [dependencies] -ruff_text_size = { workspace = true } +ruff_text_size = { workspace = true, features = ["get-size"] } get-size2 = { workspace = true } is-macro = { workspace = true } serde = { workspace = true, optional = true, features = [] } + +[features] +serde = ["dep:serde", "ruff_text_size/serde"] diff --git a/crates/ruff_source_file/Cargo.toml b/crates/ruff_source_file/Cargo.toml index ffc41ca462..33d28a449e 100644 --- a/crates/ruff_source_file/Cargo.toml +++ b/crates/ruff_source_file/Cargo.toml @@ -22,7 +22,7 @@ serde = { workspace = true, optional = true } [dev-dependencies] [features] -get-size = ["dep:get-size2"] +get-size = ["dep:get-size2", "ruff_text_size/get-size"] serde = ["dep:serde", "ruff_text_size/serde"] [lints] diff --git a/crates/ruff_workspace/Cargo.toml b/crates/ruff_workspace/Cargo.toml index 7b075f0344..f3def3ee9b 100644 --- a/crates/ruff_workspace/Cargo.toml +++ b/crates/ruff_workspace/Cargo.toml @@ -64,6 +64,7 @@ default = [] schemars = [ "dep:schemars", "ruff_formatter/schemars", + "ruff_linter/schemars", "ruff_python_formatter/schemars", "ruff_python_semantic/schemars", ] diff --git a/crates/ty_project/Cargo.toml b/crates/ty_project/Cargo.toml index 29411de0d8..6ccc1e494c 100644 --- a/crates/ty_project/Cargo.toml +++ b/crates/ty_project/Cargo.toml @@ -51,7 +51,12 @@ insta = { workspace = true, features = ["redactions", "ron"] } [features] default = ["zstd"] deflate = ["ty_vendored/deflate"] -schemars = ["dep:schemars", "ruff_db/schemars", "ty_python_semantic/schemars"] +schemars = [ + "dep:schemars", + "ruff_db/schemars", + "ruff_python_ast/schemars", + "ty_python_semantic/schemars", +] zstd = ["ty_vendored/zstd"] format = ["ruff_python_formatter"] testing = []