mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
[ty] Update salsa (#17937)
## Summary * Update salsa to pull in https://github.com/salsa-rs/salsa/pull/850. * Some refactoring of salsa event callbacks in various `Db`'s due to https://github.com/salsa-rs/salsa/pull/849 closes https://github.com/astral-sh/ty/issues/108 ## Test Plan Ran `cargo run --bin ty -- -vvv` on a test file to make sure that salsa Events are still logged.
This commit is contained in:
parent
d566636ca5
commit
4f890b2867
10 changed files with 96 additions and 113 deletions
|
@ -29,7 +29,11 @@ impl Db {
|
|||
|
||||
Self {
|
||||
system: MdtestSystem::in_memory(),
|
||||
storage: salsa::Storage::default(),
|
||||
storage: salsa::Storage::new(Some(Box::new({
|
||||
move |event| {
|
||||
tracing::trace!("event: {:?}", event);
|
||||
}
|
||||
}))),
|
||||
vendored: ty_vendored::file_system().clone(),
|
||||
files: Files::default(),
|
||||
rule_selection: Arc::new(rule_selection),
|
||||
|
@ -95,12 +99,7 @@ impl SemanticDb for Db {
|
|||
}
|
||||
|
||||
#[salsa::db]
|
||||
impl salsa::Database for Db {
|
||||
fn salsa_event(&self, event: &dyn Fn() -> salsa::Event) {
|
||||
let event = event();
|
||||
tracing::trace!("event: {:?}", event);
|
||||
}
|
||||
}
|
||||
impl salsa::Database for Db {}
|
||||
|
||||
impl DbWithWritableSystem for Db {
|
||||
type System = MdtestSystem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue