Skip to content

Commit fd3121b

Browse files
committed
Changelog: Fix analysis deadlock caused by lock acquisition order in
vendor file parsing
1 parent a4fe3e4 commit fd3121b

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **`throw new` completion no longer offers non-instantiable types.** Interfaces, abstract classes, traits, and enums are now filtered out, matching the behavior of `new` completion. The `throw new` path also now filters to Throwable descendants only.
1313
- **Unified class name completion architecture.** `throw new` and `catch()` completion now use the same `build_class_name_completions` pipeline as `new`, `extends`, `implements`, etc. `throw new` uses a `ThrowNew` context (instantiable + Throwable) and `catch()`/`@throws` uses a `Catch` context (class or interface + Throwable). This gives both contexts the same affinity scoring, FQN shortening via use-map, namespace segment drill-down, deprecation flags, and consistent filtering. The separate `build_catch_class_name_completions` function has been removed.
1414
- **Consolidated class completion passes.** The previous 5-pass architecture (use-map, same-namespace, fqn_uri_index, fqn_uri_index duplicate, stub_index) has been simplified to 2 passes (fqn_uri_index + stub_index) with an inline `classify` closure that determines tier (`'0'` use-imported, `'1'` same/sub-namespace, `'2'` everything else) per candidate. The redundant pass 4 (identical to pass 3) is eliminated, and tier assignment is now based on proximity checks rather than which data source produced the item.
15+
- **Analysis deadlock.** Lazily-parsed vendor files acquired two internal locks in the opposite order from the editor's file-change handler, causing a deadlock when both ran concurrently.
1516

1617
## [0.8.0] - 2026-05-14
1718

src/resolution.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,12 @@ impl Backend {
444444

445445
// Populate the fqn_index so that `find_class_in_uri_classes_index` can
446446
// resolve these classes via O(1) hash lookup. Also populate
447-
// fqn_uri_index (FQN -> URI) so that `find_class_file_content` can
448-
// locate the source file even after the uri_classes_index entry is cleared
449-
// by didClose. The fqn_uri_index cost is negligible (one string
450-
// pair per class).
447+
// fqn_uri_index (FQN → URI) so that go-to-definition can locate
448+
// the source file even after the uri_classes_index entry is
449+
// cleared by didClose.
451450
{
452-
let mut fqn_idx = self.fqn_class_index.write();
453451
let mut class_idx = self.fqn_uri_index.write();
452+
let mut fqn_idx = self.fqn_class_index.write();
454453
for cls in &arc_classes {
455454
if cls.name.starts_with("__anonymous@") {
456455
continue;

0 commit comments

Comments
 (0)