Skip to content

Commit

Permalink
refactor: use papaya instead of DashMap for workspace documents (#4624
Browse files Browse the repository at this point in the history
)
  • Loading branch information
arendjr authored Nov 29, 2024
1 parent c1b2e7b commit ad84856
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 146 deletions.
16 changes: 15 additions & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ indexmap = { version = "2.6.0" }
insta = "1.41.1"
natord = "1.0.9"
oxc_resolver = "1.12.0"
papaya = { git = "https://github.com/ibraheemdev/papaya" }
proc-macro2 = "1.0.86"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ biome_rowan = { workspace = true, features = ["serde"] }
biome_string_case = { workspace = true }
biome_text_edit = { workspace = true }
bpaf = { workspace = true }
dashmap = { workspace = true }
enumflags2 = { workspace = true, features = ["serde"] }
getrandom = { workspace = true, features = ["js"] }
ignore = { workspace = true }
indexmap = { workspace = true, features = ["serde"] }
oxc_resolver = { workspace = true }
papaya = { workspace = true }
regex = { workspace = true }
rustc-hash = { workspace = true }
schemars = { workspace = true, optional = true }
Expand Down
7 changes: 4 additions & 3 deletions crates/biome_service/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ impl WorkspaceSettings {
}
}

/// Checks if the current path belongs to a registered project.
/// Checks whether the current path belongs to another registered project.
///
/// If there's a match, and the match **isn't** the current project, it returns the new key.
pub fn path_belongs_to_current_workspace(&self, path: &BiomePath) -> Option<ProjectKey> {
/// If there's a match, and the match is for a project **other than** the current project, it
/// returns the new key.
pub fn path_belongs_to_other_project(&self, path: &BiomePath) -> Option<ProjectKey> {
if self.data.is_empty() {
return None;
}
Expand Down
Loading

0 comments on commit ad84856

Please sign in to comment.