File tree 1 file changed +8
-3
lines changed
Sources/BuildSystemIntegration
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -214,9 +214,7 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
214
214
private let swiftPMWorkspace : Workspace
215
215
216
216
/// A `ObservabilitySystem` from `SwiftPM` that logs.
217
- private let observabilitySystem = ObservabilitySystem ( { scope, diagnostic in
218
- logger. log ( level: diagnostic. severity. asLogLevel, " SwiftPM log: \( diagnostic. description) " )
219
- } )
217
+ private let observabilitySystem : ObservabilitySystem
220
218
221
219
// MARK: Build system state (modified on package reload)
222
220
@@ -280,6 +278,13 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
280
278
self . testHooks = testHooks
281
279
self . connectionToSourceKitLSP = connectionToSourceKitLSP
282
280
281
+ self . observabilitySystem = ObservabilitySystem ( { scope, diagnostic in
282
+ connectionToSourceKitLSP. send (
283
+ OnBuildLogMessageNotification ( type: . info, task: TaskId ( id: " swiftpm-log " ) , message: diagnostic. description)
284
+ )
285
+ logger. log ( level: diagnostic. severity. asLogLevel, " SwiftPM log: \( diagnostic. description) " )
286
+ } )
287
+
283
288
guard let destinationToolchainBinDir = toolchain. swiftc? . deletingLastPathComponent ( ) else {
284
289
throw Error . cannotDetermineHostToolchain
285
290
}
You can’t perform that action at this time.
0 commit comments