mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-06 18:24:36 +01:00
Revert asyncificaiton changes
The asyncification changes caused some non-deterministic test failures. I believe that some of these are due to race conditions that are the result of the partial transition to actors. Instead of merging the asyncification piece by piece, I will collect the changes asyncification changes in a branch and then qualify that branch througougly (running CI multiple times) before merging it into `main`.
This commit is contained in:
@@ -38,17 +38,13 @@ public final class FallbackBuildSystem: BuildSystem {
|
||||
/// Delegate to handle any build system events.
|
||||
public weak var delegate: BuildSystemDelegate? = nil
|
||||
|
||||
public func setDelegate(_ delegate: BuildSystemDelegate?) async {
|
||||
self.delegate = delegate
|
||||
}
|
||||
|
||||
public var indexStorePath: AbsolutePath? { return nil }
|
||||
|
||||
public var indexDatabasePath: AbsolutePath? { return nil }
|
||||
|
||||
public var indexPrefixMappings: [PathPrefixMapping] { return [] }
|
||||
|
||||
public func buildSettings(for uri: DocumentURI, language: Language) -> FileBuildSettings? {
|
||||
public func settings(for uri: DocumentURI, _ language: Language) -> FileBuildSettings? {
|
||||
switch language {
|
||||
case .swift:
|
||||
return settingsSwift(uri.pseudoPath)
|
||||
@@ -62,9 +58,9 @@ public final class FallbackBuildSystem: BuildSystem {
|
||||
public func registerForChangeNotifications(for uri: DocumentURI, language: Language) {
|
||||
guard let delegate = self.delegate else { return }
|
||||
|
||||
let settings = self.buildSettings(for: uri, language: language)
|
||||
Task {
|
||||
await delegate.fileBuildSettingsChanged([uri: FileBuildSettingsChange(settings)])
|
||||
let settings = self.settings(for: uri, language)
|
||||
DispatchQueue.global().async {
|
||||
delegate.fileBuildSettingsChanged([uri: FileBuildSettingsChange(settings)])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user