Skip to content

Commit d612436

Browse files
authored
When compiling manifests, filter out remarks emitted by new Swift compiler driver (#3290)
* Temporary workaround to filter out remarks emitted by Swift compiler driver in newer toolchains. This remark is temporary, but is causing spurious test failures for tests that make sure there are no diagnostics. * Add Radar number to comment about temporary workaround.
1 parent fd14a63 commit d612436

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/PackageLoading/ManifestLoader.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,10 @@ public final class ManifestLoader: ManifestLoaderProtocol {
513513
// We might have some non-fatal output (warnings/notes) from the compiler even when
514514
// we were able to parse the manifest successfully.
515515
if let compilerOutput = result.compilerOutput {
516-
diagnostics?.emit(.warning(ManifestLoadingDiagnostic(output: compilerOutput, diagnosticFile: result.diagnosticFile)))
516+
// FIXME: Temporary workaround to filter out debug output from integrated Swift driver. [rdar://73710910]
517+
if !(compilerOutput.hasPrefix("<unknown>:0: remark: new Swift driver at") && compilerOutput.hasSuffix("will be used")) {
518+
diagnostics?.emit(.warning(ManifestLoadingDiagnostic(output: compilerOutput, diagnosticFile: result.diagnosticFile)))
519+
}
517520
}
518521

519522
return parsedManifest

0 commit comments

Comments
 (0)