Skip to content

[Sema] Integrate @_spiOnly imports logic with recent API checks #61023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Sep 9, 2022

We recently added checks to prevent SDK breakages and downgraded to warnings until Swift 6. Since @_spiOnly is a new feature we can skip the warning step and apply them as errors right away.

  1. Public use of a typealiases that desugars to something from an @_spiOnly import is reported as an error.
  2. Public use of an @_spiOnly imported conformance is reported as an error.
  3. Accept @_spiOnly imports of a private module from a public module.

This follows the exportability check added in #61011. Next I’ll add reports of conflicting imports from the same file, and look into better integration with the SPI library-level.

@xymus xymus requested review from elsh and tshortli September 9, 2022 18:59
@xymus
Copy link
Contributor Author

xymus commented Sep 9, 2022

@swift-ci Please smoke test

@xymus xymus merged commit ea27698 into swiftlang:main Sep 12, 2022
@xymus xymus deleted the spi-only-and-apis branch September 12, 2022 21:20
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