mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialization: Error on xref to implementation-only dependencies
Introduce a last resort check reporting references to implementation-only dependencies that would appear in the generated swiftmodule. This check is applied at serialization, long after exportability checking applied at typechecking. It should act as a back stop to references missed by typechecking or @_implementationOnly decls that should have been skipped. This check is gated behind CheckImplementationOnlyStrict and should be used with embedded only. rdar://160697599
This commit is contained in:
@@ -887,6 +887,10 @@ REMARK(serialization_skipped_invalid_type_unknown_name,none,
|
||||
ERROR(serialization_failed,none,
|
||||
"serialization of module %0 failed due to the errors above",
|
||||
(const ModuleDecl *))
|
||||
ERROR(serialization_xref_to_hidden_dependency,none,
|
||||
"invalid reference to implementation-only imported module %0"
|
||||
"%select{| for %1}1",
|
||||
(const ModuleDecl *, const Decl *))
|
||||
|
||||
WARNING(can_import_invalid_swiftmodule,none,
|
||||
"canImport() evaluated to false due to invalid swiftmodule: %0", (StringRef))
|
||||
|
||||
Reference in New Issue
Block a user