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 21696c5
Show file tree
Hide file tree
Showing 5 changed files with 549 additions and 104 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/red_knot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ clap = { workspace = true, features = ["wrap_help"] }
countme = { workspace = true, features = ["enable"] }
crossbeam = { workspace = true }
ctrlc = { version = "3.4.4" }
filetime = { workspace = true }
notify = { workspace = true }
rayon = { workspace = true }
rustc-hash = { workspace = true }
salsa = { workspace = true }
filetime = { workspace = true }
tracing = { workspace = true }
tracing = { workspace = true, features = ["log"] }
tracing-log = "0.2.0"
tracing-subscriber = { workspace = true }
tracing-tree = { 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 21696c5

Please sign in to comment.