Skip to content

Conversation

@xymus
Copy link
Contributor

@xymus xymus commented Nov 11, 2025

Introduce the CheckImplementationOnlyStrict feature that extends CheckImplementationOnly with two features suitable for embedded mode.

It enables skipping serializing decls that should not be read by embedded clients. Notably @_implementationOnly types and non-public @export(interface) functions.

It applies 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 decls that should have skipped serialization.

rdar://160697599

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
@xymus
Copy link
Contributor Author

xymus commented Nov 11, 2025

@swift-ci Please smoke test

@xymus xymus merged commit 937e6c5 into swiftlang:main Nov 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant