mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Instead of having FileHandlingCapability for a source file, check if it belongs to any targets
This commit is contained in:
@@ -489,10 +489,7 @@ extension SwiftPMBuildSystem {
|
||||
targets[targetIdentifier] = (buildTarget, depth)
|
||||
}
|
||||
|
||||
if let delegate = self.delegate {
|
||||
await delegate.fileHandlingCapabilityChanged()
|
||||
await messageHandler?.sendNotificationToSourceKitLSP(DidChangeBuildTargetNotification(changes: nil))
|
||||
}
|
||||
await messageHandler?.sendNotificationToSourceKitLSP(DidChangeBuildTargetNotification(changes: nil))
|
||||
for testFilesDidChangeCallback in testFilesDidChangeCallbacks {
|
||||
await testFilesDidChangeCallback()
|
||||
}
|
||||
@@ -851,13 +848,6 @@ extension SwiftPMBuildSystem: BuildSystemIntegration.BuiltInBuildSystem {
|
||||
await self.fileDependenciesUpdatedDebouncer.scheduleCall(filesWithUpdatedDependencies)
|
||||
}
|
||||
|
||||
package func fileHandlingCapability(for uri: DocumentURI) -> FileHandlingCapability {
|
||||
if targets(for: uri).isEmpty {
|
||||
return .unhandled
|
||||
}
|
||||
return .handled
|
||||
}
|
||||
|
||||
package func sourceFiles() -> [SourceFileInfo] {
|
||||
var sourceFiles: [DocumentURI: SourceFileInfo] = [:]
|
||||
for (buildTarget, depth) in self.targets.values {
|
||||
|
||||
Reference in New Issue
Block a user