mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Don’t block the generation of a build system by build graph generation
We currently load the entire package before generating a `SwiftPMBuildSystem`. That means that the initialize request to SourceKit-LSP is blocked until the package has been loaded, preventing us from offering any sort of functionality, including syntactic functionality like formatting. Decouple build system creation and build graph generation (aka. package loading for SwiftPM). We can operate with fallback build settings until the build graph has been loaded and reopen the document once the proper build settings are available. rdar://126644596
This commit is contained in:
@@ -281,7 +281,9 @@ extension BuildServerBuildSystem: BuildSystem {
|
||||
return [ConfiguredTarget(targetID: "dummy", runDestinationID: "dummy")]
|
||||
}
|
||||
|
||||
package func generateBuildGraph(allowFileSystemWrites: Bool) {}
|
||||
package func generateBuildGraph() {}
|
||||
|
||||
package func waitForUpToDateBuildGraph() async {}
|
||||
|
||||
package func topologicalSort(of targets: [ConfiguredTarget]) async -> [ConfiguredTarget]? {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user