swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
755 stars 54 forks source link

Add action to the command palette to re-index a project #939

Closed ahoppen closed 3 months ago

ahoppen commented 4 months ago

https://github.com/swiftlang/sourcekit-lsp/pull/1507 added a workspace/triggerReindex request to SourceKit-LSP, which re-indexes a project in SourceKit-LSP if background indexing is enabled.

The request is not intended to be something that users invoke regularly but it is useful as a workaround should SourceKit-LSP’s index up-to-date tracker get out of sync with the project state (which we know can happen in some situations like https://github.com/apple/sourcekit-lsp/issues/1264). The workflow should thus be as follow:

ahoppen commented 3 months ago

Implemented by https://github.com/swiftlang/vscode-swift/pull/964