Support index store path remappings (#562)

This allows sourcekit-lsp to make use of the path remappings recently added to
the index store and IndexStoreDB to remap remote paths into local paths
when loading index data locally.

These remappings can be provided via the `-index-prefix-map` command line flag to sourcekit-lsp or via the `BuildSystem` integration point.

(cherry picked from commit 472a06c88a)
This commit is contained in:
David Goldman
2022-06-09 10:45:52 -04:00
parent 9872634508
commit c94b0d058c
12 changed files with 63 additions and 2 deletions

View File

@@ -35,6 +35,9 @@ public final class BuildServerBuildSystem {
public private(set) var indexDatabasePath: AbsolutePath?
public private(set) var indexStorePath: AbsolutePath?
// FIXME: Add support for prefix mappings to the Build Server protocol.
public var indexPrefixMappings: [PathPrefixMapping] { return [] }
/// Delegate to handle any build system events.
public weak var delegate: BuildSystemDelegate? {
get { return self.handler?.delegate }