Skip to content

Commit

Permalink
Fix concurrent mutation crash while indexing. Closes #450 & #451 (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch authored Jan 3, 2022
1 parent d90cdf4 commit 2762a6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

##### Bug Fixes

- None.
- Fix a crash while indexing.

## 2.8.4 (2021-12-30)

Expand Down
6 changes: 4 additions & 2 deletions Sources/PeripheryKit/Indexer/SwiftIndexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,10 @@ public final class SwiftIndexer {
continue
}

for ref in refs {
associateUnsafe(ref, with: decl)
graph.mutating {
for ref in refs {
associateUnsafe(ref, with: decl)
}
}
}
}
Expand Down

0 comments on commit 2762a6b

Please sign in to comment.