red-knot: Port module resolver to salsa (#11835)

This commit is contained in:
Micha Reiser 2024-06-18 13:11:58 +01:00 committed by GitHub
parent 98b13b9844
commit 26ac805e6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 1953 additions and 36 deletions

View file

@ -54,7 +54,6 @@ impl std::fmt::Debug for SourceText {
#[cfg(test)]
mod tests {
use filetime::FileTime;
use salsa::EventKind;
use ruff_source_file::OneIndexed;
@ -80,7 +79,7 @@ mod tests {
db.file_system_mut()
.write_file(path, "x = 20".to_string())
.unwrap();
file.set_revision(&mut db).to(FileTime::now().into());
file.touch(&mut db);
assert_eq!(&*source_text(&db, file), "x = 20");