mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Restrict resilient swiftmodules to the compiler that built them
Introduce a new loading restriction that is more strict than the serialization version check on swiftmodules. Tagged compilers will only load library-evolution enabled swiftmodules that are produced by a compiler with the exact same revision id. This will be more reliable in production environments than using the serialization version which we forgot to update from time to time. This shouldn't affect development compilers that will still load any module with a compatible serialization version. rdar://83105234
This commit is contained in:
@@ -839,6 +839,10 @@ void swift::serialization::diagnoseSerializedASTLoadFailure(
|
||||
Ctx.Diags.diagnose(diagLoc, diag::serialization_module_too_old, ModuleName,
|
||||
moduleBufferID);
|
||||
break;
|
||||
case serialization::Status::RevisionIncompatible:
|
||||
Ctx.Diags.diagnose(diagLoc, diag::serialization_module_incompatible_revision,
|
||||
ModuleName, moduleBufferID);
|
||||
break;
|
||||
case serialization::Status::Malformed:
|
||||
Ctx.Diags.diagnose(diagLoc, diag::serialization_malformed_module,
|
||||
moduleBufferID);
|
||||
|
||||
Reference in New Issue
Block a user