Files
Xi Ge 815a2a1347 serialization: emit proper diagnostics for conformance witnesses that reference unloaded modules instead of deserialization crash. rdar://184957828
When a deserialized conformance's witness cross-references a module that was
never loaded (e.g. a dependency behind `internal import` that isn't
re-exported), deserialization used to abort (*** DESERIALIZATION FAILURE ***).
Recover instead by installing an opaque witness and continuing; the failure
resurfaces as a normal requirement error at the use site.

Also record the unloaded module name at the recovery site, keyed by the
conforming nominal type in an ASTContext side-table (the NormalProtocolConformance
isn't reachable at the Sema error site). When the requirement failure is
diagnosed, emit a note naming the module and the import to add.
2026-08-20 12:21:54 -07:00
..