@@ -290,28 +290,26 @@ public final class ManifestLoader: ManifestLoaderProtocol {
290
290
// We might have some non-fatal output (warnings/notes) from the compiler even when
291
291
// we were able to parse the manifest successfully.
292
292
if let compilerOutput = result. compilerOutput {
293
- // FIXME: Isn't the judgement too naive?
293
+ // FIXME: Isn't the strategy too naive?
294
294
var outputSeverity : Basics . Diagnostic . Severity = . warning
295
- #if os(Windows)
296
- // Filter out link.exe note when creating manifest executable.
295
+ #if os(Windows)
296
+ // Filter out `LINK` note for creating manifest executable.
297
297
if let compiledManifestName = result. compiledManifestFile? . basenameWithoutExt,
298
298
!compilerOutput. contains ( where: \. isNewline) {
299
299
if compilerOutput. contains ( " \( compiledManifestName) .lib " ) && compilerOutput. contains ( " \( compiledManifestName) .exp " ) {
300
300
outputSeverity = . debug
301
301
}
302
302
}
303
- #endif
304
- if !compilerOutput. isEmpty {
305
- let metadata = result. diagnosticFile. map { diagnosticFile -> ObservabilityMetadata in
306
- var metadata = ObservabilityMetadata ( )
307
- metadata. manifestLoadingDiagnosticFile = diagnosticFile
308
- return metadata
309
- }
310
- observabilityScope. emit ( severity: outputSeverity, message: compilerOutput, metadata: metadata)
311
-
312
- // FIXME: (diagnostics) deprecate in favor of the metadata version ^^ when transitioning manifest loader to Observability APIs
313
- //observabilityScope.emit(.warning(ManifestLoadingDiagnostic(output: compilerOutput, diagnosticFile: result.diagnosticFile)))
303
+ #endif
304
+ let metadata = result. diagnosticFile. map { diagnosticFile -> ObservabilityMetadata in
305
+ var metadata = ObservabilityMetadata ( )
306
+ metadata. manifestLoadingDiagnosticFile = diagnosticFile
307
+ return metadata
314
308
}
309
+ observabilityScope. emit ( severity: outputSeverity, message: compilerOutput, metadata: metadata)
310
+
311
+ // FIXME: (diagnostics) deprecate in favor of the metadata version ^^ when transitioning manifest loader to Observability APIs
312
+ //observabilityScope.emit(.warning(ManifestLoadingDiagnostic(output: compilerOutput, diagnosticFile: result.diagnosticFile)))
315
313
}
316
314
317
315
return try ManifestJSONParser . parse (
0 commit comments