swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.3k stars 273 forks source link

Rewrite how “Preparing current file” is differentiated from the generic “Preparing targets” #1465

Closed ahoppen closed 3 months ago

ahoppen commented 3 months ago

The old implementation of inspecting the InProgressPrepareForEditorTask has a few race conditions including the fact that we would start the preparation task before the inProgressPrepareForEditorTask was set.

Instead, keep track of the purpose for each preparation task. This ends up simplifying the code as well.

ahoppen commented 3 months ago

@swift-ci Please test

ahoppen commented 3 months ago

@swift-ci Please test

ahoppen commented 3 months ago

@swift-ci Please test Windows