Skip to content

Commit

Permalink
Add tests for hard and soft links
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Jul 31, 2024
1 parent 83b1c48 commit a8ec90d
Show file tree
Hide file tree
Showing 4 changed files with 584 additions and 101 deletions.
2 changes: 1 addition & 1 deletion crates/red_knot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ notify = { workspace = true }
rayon = { workspace = true }
rustc-hash = { workspace = true }
salsa = { workspace = true }
filetime = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-tree = { workspace = true }

[dev-dependencies]
filetime = { workspace = true }
tempfile = { workspace = true }


Expand Down
8 changes: 3 additions & 5 deletions crates/red_knot/src/db.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::panic::{AssertUnwindSafe, RefUnwindSafe};
use std::sync::Arc;

use salsa::Cancelled;

use red_knot_module_resolver::{vendored_typeshed_stubs, Db as ResolverDb};
use red_knot_python_semantic::Db as SemanticDb;
Expand All @@ -10,6 +7,7 @@ use ruff_db::program::{Program, ProgramSettings};
use ruff_db::system::System;
use ruff_db::vendored::VendoredFileSystem;
use ruff_db::{Db as SourceDb, Upcast};
use salsa::Cancelled;

use crate::lint::Diagnostics;
use crate::workspace::{check_file, Workspace, WorkspaceMetadata};
Expand All @@ -24,7 +22,7 @@ pub struct RootDatabase {
workspace: Option<Workspace>,
storage: salsa::Storage<RootDatabase>,
files: Files,
system: Arc<dyn System + Send + Sync + RefUnwindSafe>,
system: Box<dyn System + Send + Sync + RefUnwindSafe>,
}

impl RootDatabase {
Expand All @@ -36,7 +34,7 @@ impl RootDatabase {
workspace: None,
storage: salsa::Storage::default(),
files: Files::default(),
system: Arc::new(system),
system: Box::new(system),
};

let workspace = Workspace::from_metadata(&db, workspace);
Expand Down
Loading

0 comments on commit a8ec90d

Please sign in to comment.