mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #64074 from xymus/report-mismatching-module-version-to-stderr
[Serialization] Remark only on stderr when loading a mismatching swiftmodule
This commit is contained in:
@@ -850,11 +850,13 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
|
||||
loadedModuleFile->mayHaveDiagnosticsPointingAtBuffer())
|
||||
OrphanedModuleFiles.push_back(std::move(loadedModuleFile));
|
||||
} else {
|
||||
// Report non-fatal compiler tag mismatch.
|
||||
// Report non-fatal compiler tag mismatch on stderr only to avoid
|
||||
// polluting the IDE UI.
|
||||
if (!loadInfo.problematicRevision.empty()) {
|
||||
Ctx.Diags.diagnose(*diagLoc,
|
||||
diag::serialization_module_problematic_revision,
|
||||
loadInfo.problematicRevision, moduleBufferID);
|
||||
llvm::errs() << "remark: compiled module was created by a different " <<
|
||||
"version of the compiler '" <<
|
||||
loadInfo.problematicRevision <<
|
||||
"': " << moduleBufferID << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user