File tree Expand file tree Collapse file tree 3 files changed +4
-19
lines changed Expand file tree Collapse file tree 3 files changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,6 @@ public actor BuildSystemManager {
120
120
121
121
public func filesDidChange( _ events: [ FileEvent ] ) async {
122
122
await self . buildSystem? . filesDidChange ( events)
123
- self . fallbackBuildSystem? . filesDidChange ( events)
124
123
}
125
124
}
126
125
@@ -206,7 +205,6 @@ extension BuildSystemManager {
206
205
}
207
206
208
207
await buildSystem? . registerForChangeNotifications ( for: mainFile, language: language)
209
- fallbackBuildSystem? . registerForChangeNotifications ( for: mainFile, language: language)
210
208
}
211
209
212
210
/// Return settings for `file` based on the `change` settings for `mainFile`.
@@ -248,7 +246,7 @@ extension BuildSystemManager {
248
246
public func fileHandlingCapability( for uri: DocumentURI ) async -> FileHandlingCapability {
249
247
return max (
250
248
await buildSystem? . fileHandlingCapability ( for: uri) ?? . unhandled,
251
- fallbackBuildSystem? . fileHandlingCapability ( for : uri ) ?? . unhandled
249
+ fallbackBuildSystem != nil ? . fallback : . unhandled
252
250
)
253
251
}
254
252
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import class TSCBasic.Process
21
21
import struct TSCBasic. AbsolutePath
22
22
23
23
/// A simple BuildSystem suitable as a fallback when accurate settings are unknown.
24
- public final class FallbackBuildSystem : BuildSystem {
24
+ public final class FallbackBuildSystem {
25
25
26
26
let buildSetup : BuildSetup
27
27
@@ -59,13 +59,6 @@ public final class FallbackBuildSystem: BuildSystem {
59
59
}
60
60
}
61
61
62
- public func registerForChangeNotifications( for uri: DocumentURI , language: Language ) {
63
- // Fallback build systems never change.
64
- }
65
-
66
- /// We don't support change watching.
67
- public func unregisterForChangeNotifications( for: DocumentURI ) { }
68
-
69
62
func settingsSwift( _ file: String ) -> FileBuildSettings {
70
63
var args : [ String ] = [ ]
71
64
args. append ( contentsOf: self . buildSetup. flags. swiftCompilerFlags)
@@ -98,10 +91,4 @@ public final class FallbackBuildSystem: BuildSystem {
98
91
args. append ( file)
99
92
return FileBuildSettings ( compilerArguments: args)
100
93
}
101
-
102
- public func filesDidChange( _ events: [ FileEvent ] ) { }
103
-
104
- public func fileHandlingCapability( for uri: DocumentURI ) -> FileHandlingCapability {
105
- return . fallback
106
- }
107
94
}
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ final class BuildSystemManagerTests: XCTestCase {
34
34
]
35
35
36
36
let bsm = await BuildSystemManager (
37
- buildSystem: FallbackBuildSystem ( buildSetup : . default ) ,
38
- fallbackBuildSystem: nil ,
37
+ buildSystem: nil ,
38
+ fallbackBuildSystem: FallbackBuildSystem ( buildSetup : . default ) ,
39
39
mainFilesProvider: mainFiles)
40
40
defer { withExtendedLifetime ( bsm) { } } // Keep BSM alive for callbacks.
41
41
You can’t perform that action at this time.
0 commit comments