[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:
David Peter 2025-05-08 12:02:53 +02:00 committed by GitHub
parent d566636ca5
commit 4f890b2867
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 96 additions and 113 deletions

View file

@ -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;