mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 22:01:47 +00:00
[red-knot] Add basic workspace support (#12318)
This commit is contained in:
parent
0c72577b5d
commit
91338ae902
29 changed files with 1018 additions and 664 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::hash::BuildHasherDefault;
|
||||
|
||||
use program::Program;
|
||||
use rustc_hash::FxHasher;
|
||||
use salsa::DbWithJar;
|
||||
|
||||
|
@ -12,6 +13,7 @@ use crate::vendored::VendoredFileSystem;
|
|||
pub mod file_revision;
|
||||
pub mod files;
|
||||
pub mod parsed;
|
||||
pub mod program;
|
||||
pub mod source;
|
||||
pub mod system;
|
||||
pub mod testing;
|
||||
|
@ -20,7 +22,7 @@ pub mod vendored;
|
|||
pub(crate) type FxDashMap<K, V> = dashmap::DashMap<K, V, BuildHasherDefault<FxHasher>>;
|
||||
|
||||
#[salsa::jar(db=Db)]
|
||||
pub struct Jar(File, source_text, line_index, parsed_module);
|
||||
pub struct Jar(File, Program, source_text, line_index, parsed_module);
|
||||
|
||||
/// Most basic database that gives access to files, the host system, source code, and parsed AST.
|
||||
pub trait Db: DbWithJar<Jar> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue