mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-06-24 12:21:58 +02:00
64aa354caf
When the client opts in to `workspace/tests/refresh` or `workspace/playgrounds/refresh` via experimental client capabilities, SourceKit-LSP now maintains a proactive cache of the current test and playground lists and sends the corresponding `workspace/.../refresh` notification whenever the cache changes. `workspaceTests()` / `workspacePlaygrounds()` then serve subsequent fetch requests directly from the cache. Add `EntryPointManager`: runs background scans, stores the results, fires callbacks on changes: - Start scanning when build targets are updated including initial updates, any watched files are changed, and index is updated. - Send '/refresh' server initiated requests when the cache has changed. - Coalesces rapid invalidations by cancelling any in-flight refresh task. Also: - Simplify `SourceKitIndexDelegate` from an `actor` with `AtomicInt32` to a plain `class`, since it is only called from IndexStoreDB's internal serial dispatch queue.