Skip to content

Commit 32d9059

Browse files
committed
Patch Ruff packages for RustPython release
1 parent 724ccc1 commit 32d9059

12 files changed

Lines changed: 220 additions & 227 deletions

File tree

Cargo.lock

Lines changed: 184 additions & 188 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ ruff_markdown = { path = "crates/ruff_markdown" }
2727
ruff_memory_usage = { path = "crates/ruff_memory_usage" }
2828
ruff_notebook = { path = "crates/ruff_notebook" }
2929
ruff_options_metadata = { path = "crates/ruff_options_metadata" }
30-
ruff_python_ast = { path = "crates/ruff_python_ast" }
30+
ruff_python_ast = { package = "rustpython-ruff_python_ast", path = "crates/ruff_python_ast", version = "0.15.9" }
3131
ruff_python_codegen = { path = "crates/ruff_python_codegen" }
3232
ruff_python_formatter = { path = "crates/ruff_python_formatter" }
3333
ruff_python_importer = { path = "crates/ruff_python_importer" }
3434
ruff_python_index = { path = "crates/ruff_python_index" }
3535
ruff_python_literal = { path = "crates/ruff_python_literal" }
36-
ruff_python_parser = { path = "crates/ruff_python_parser" }
36+
ruff_python_parser = { package = "rustpython-ruff_python_parser", path = "crates/ruff_python_parser", version = "0.15.9" }
3737
ruff_python_semantic = { path = "crates/ruff_python_semantic" }
3838
ruff_python_stdlib = { path = "crates/ruff_python_stdlib" }
39-
ruff_python_trivia = { path = "crates/ruff_python_trivia" }
39+
ruff_python_trivia = { package = "rustpython-ruff_python_trivia", path = "crates/ruff_python_trivia", version = "0.15.9" }
4040
ruff_server = { path = "crates/ruff_server" }
41-
ruff_source_file = { path = "crates/ruff_source_file" }
42-
ruff_text_size = { path = "crates/ruff_text_size" }
41+
ruff_source_file = { package = "rustpython-ruff_source_file", path = "crates/ruff_source_file", version = "0.15.9" }
42+
ruff_text_size = { package = "rustpython-ruff_text_size", path = "crates/ruff_text_size", version = "0.15.9" }
4343
ruff_workspace = { path = "crates/ruff_workspace" }
4444

4545
ty = { path = "crates/ty" }
@@ -285,9 +285,9 @@ codegen-units = 16
285285
# Some crates don't change as much but benefit more from
286286
# more expensive optimization passes, so we selectively
287287
# decrease codegen-units in some cases.
288-
[profile.release.package.ruff_python_parser]
288+
[profile.release.package.rustpython-ruff_python_parser]
289289
codegen-units = 1
290-
[profile.release.package.ruff_python_ast]
290+
[profile.release.package.rustpython-ruff_python_ast]
291291
codegen-units = 1
292292
[profile.release.package.salsa]
293293
codegen-units = 1
@@ -309,7 +309,7 @@ opt-level = 3
309309

310310
# Reduce complexity of a parser function that would trigger a locals limit in a wasm tool.
311311
# https://github.com/bytecodealliance/wasm-tools/blob/b5c3d98e40590512a3b12470ef358d5c7b983b15/crates/wasmparser/src/limits.rs#L29
312-
[profile.dev.package.ruff_python_parser]
312+
[profile.dev.package.rustpython-ruff_python_parser]
313313
opt-level = 1
314314

315315
# This profile is meant to mimic the `release` profile as closely as

crates/ruff_linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ruff_db = { workspace = true, features = ["junit", "serde"] }
1818
ruff_diagnostics = { workspace = true, features = ["serde"] }
1919
ruff_macros = { workspace = true }
2020
ruff_notebook = { workspace = true }
21-
ruff_python_ast = { workspace = true, features = ["serde", "cache"] }
21+
ruff_python_ast = { workspace = true }
2222
ruff_python_codegen = { workspace = true }
2323
ruff_python_importer = { workspace = true }
2424
ruff_python_index = { workspace = true }

crates/ruff_python_ast/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_python_ast"
3-
version = "0.0.0"
4-
publish = false
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_python_ast"
4+
version = "0.15.9"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }
@@ -17,8 +17,8 @@ ignored = ["ruff_cache"]
1717
[lib]
1818

1919
[dependencies]
20-
ruff_cache = { workspace = true, optional = true }
21-
ruff_macros = { workspace = true, optional = true }
20+
# ruff_cache = { workspace = true, optional = true }
21+
# ruff_macros = { workspace = true, optional = true }
2222
ruff_python_trivia = { workspace = true }
2323
ruff_source_file = { workspace = true }
2424
ruff_text_size = { workspace = true }
@@ -30,21 +30,21 @@ get-size2 = { workspace = true, optional = true }
3030
is-macro = { workspace = true }
3131
memchr = { workspace = true }
3232
rustc-hash = { workspace = true }
33-
salsa = { workspace = true, optional = true }
33+
# salsa = { workspace = true, optional = true }
3434
schemars = { workspace = true, optional = true }
3535
serde = { workspace = true, optional = true }
3636
serde_json = { workspace = true, optional = true }
3737
thiserror = { workspace = true }
3838

3939
[features]
4040
schemars = ["dep:schemars", "dep:serde_json"]
41-
cache = ["dep:ruff_cache", "dep:ruff_macros"]
42-
serde = [
43-
"dep:serde",
44-
"ruff_text_size/serde",
45-
"dep:ruff_cache",
46-
"compact_str/serde",
47-
]
41+
# cache = ["dep:ruff_cache", "dep:ruff_macros"]
42+
# serde = [
43+
# "dep:serde",
44+
# "ruff_text_size/serde",
45+
# "dep:ruff_cache",
46+
# "compact_str/serde",
47+
# ]
4848
get-size = ["dep:get-size2", "ruff_text_size/get-size"]
4949

5050
[lints]

crates/ruff_python_ast/src/name.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ use crate::generated::ExprName;
88

99
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1010
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
11-
#[cfg_attr(feature = "cache", derive(ruff_macros::CacheKey))]
12-
#[cfg_attr(feature = "salsa", derive(salsa::Update))]
1311
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
1412
#[cfg_attr(
1513
feature = "schemars",

crates/ruff_python_ast/src/python_version.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::{fmt, str::FromStr};
44
///
55
/// N.B. This does not necessarily represent a Python version that we actually support.
66
#[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
7-
#[cfg_attr(feature = "cache", derive(ruff_macros::CacheKey))]
87
#[cfg_attr(feature = "get-size", derive(get_size2::GetSize))]
98
pub struct PythonVersion {
109
pub major: u8,

crates/ruff_python_parser/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_python_parser"
3-
version = "0.0.0"
4-
publish = false
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_python_parser"
4+
version = "0.15.9"
55
authors = ["Charlie Marsh <charlie.r.marsh@gmail.com>", "RustPython Team"]
66
edition = { workspace = true }
77
rust-version = { workspace = true }

crates/ruff_python_trivia/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_python_trivia"
3-
version = "0.0.0"
4-
publish = false
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_python_trivia"
4+
version = "0.15.9"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }

crates/ruff_source_file/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_source_file"
3-
version = "0.0.0"
4-
publish = false
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_source_file"
4+
version = "0.15.9"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }

crates/ruff_text_size/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2-
name = "ruff_text_size"
3-
version = "0.0.0"
4-
publish = false
2+
description = "Unofficial fork for RustPython"
3+
name = "rustpython-ruff_text_size"
4+
version = "0.15.9"
55
authors = { workspace = true }
66
edition = { workspace = true }
77
rust-version = { workspace = true }

0 commit comments

Comments
 (0)