mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +00:00
Remove the optional salsa dependency from the AST crate (#14363)
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz (push) Blocked by required conditions
CI / Fuzz the parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz (push) Blocked by required conditions
CI / Fuzz the parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
This commit is contained in:
parent
9f3235a37f
commit
2b58705cc1
5 changed files with 3 additions and 21 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2778,7 +2778,6 @@ dependencies = [
|
|||
"ruff_source_file",
|
||||
"ruff_text_size",
|
||||
"rustc-hash 2.0.0",
|
||||
"salsa",
|
||||
"schemars",
|
||||
"serde",
|
||||
]
|
||||
|
|
|
@ -13,7 +13,7 @@ license = { workspace = true }
|
|||
[dependencies]
|
||||
ruff_db = { workspace = true }
|
||||
ruff_index = { workspace = true }
|
||||
ruff_python_ast = { workspace = true, features = ["salsa"] }
|
||||
ruff_python_ast = { workspace = true }
|
||||
ruff_python_parser = { workspace = true }
|
||||
ruff_python_stdlib = { workspace = true }
|
||||
ruff_source_file = { workspace = true }
|
||||
|
|
|
@ -954,7 +954,7 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
|
||||
let function_ty = Type::FunctionLiteral(FunctionType::new(
|
||||
self.db,
|
||||
&*name.id,
|
||||
&name.id,
|
||||
function_kind,
|
||||
body_scope,
|
||||
decorator_tys,
|
||||
|
@ -1069,7 +1069,7 @@ impl<'db> TypeInferenceBuilder<'db> {
|
|||
|
||||
let maybe_known_class = KnownClass::try_from_file(self.db, self.file, name);
|
||||
|
||||
let class = Class::new(self.db, &*name.id, body_scope, maybe_known_class);
|
||||
let class = Class::new(self.db, &name.id, body_scope, maybe_known_class);
|
||||
let class_ty = Type::class_literal(class);
|
||||
|
||||
self.add_declaration_with_binding(class_node.into(), definition, class_ty, class_ty);
|
||||
|
|
|
@ -26,7 +26,6 @@ is-macro = { workspace = true }
|
|||
itertools = { workspace = true }
|
||||
memchr = { workspace = true }
|
||||
rustc-hash = { workspace = true }
|
||||
salsa = { workspace = true, optional = true }
|
||||
schemars = { workspace = true, optional = true }
|
||||
serde = { workspace = true, optional = true }
|
||||
|
||||
|
@ -39,7 +38,6 @@ serde = [
|
|||
"dep:ruff_cache",
|
||||
"compact_str/serde",
|
||||
]
|
||||
salsa = ["dep:salsa"]
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
@ -205,21 +205,6 @@ impl schemars::JsonSchema for Name {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "salsa")]
|
||||
impl salsa::plumbing::interned::Lookup<Name> for &str {
|
||||
fn hash<H: Hasher>(&self, h: &mut H) {
|
||||
std::hash::Hash::hash(self, h);
|
||||
}
|
||||
|
||||
fn eq(&self, data: &Name) -> bool {
|
||||
self == data
|
||||
}
|
||||
|
||||
fn into_owned(self) -> Name {
|
||||
Name::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// A representation of a qualified name, like `typing.List`.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct QualifiedName<'a>(SegmentsVec<'a>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue