File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Sources/BuildSystemIntegration Expand file tree Collapse file tree 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 {
214214 private let swiftPMWorkspace : Workspace
215215
216216 /// 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
220218
221219 // MARK: Build system state (modified on package reload)
222220
@@ -280,6 +278,13 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
280278 self . testHooks = testHooks
281279 self . connectionToSourceKitLSP = connectionToSourceKitLSP
282280
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+
283288 guard let destinationToolchainBinDir = toolchain. swiftc? . deletingLastPathComponent ( ) else {
284289 throw Error . cannotDetermineHostToolchain
285290 }
You can’t perform that action at this time.
0 commit comments