Skip to content

Implement Swift version of SPI_AVAILABLE as @_spi_available #41692

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 12 commits into from
Mar 6, 2022

Conversation

nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Mar 5, 2022

Like @available, this attribute indicates a decl is available only as an SPI.
This implies several behavioral changes comparing to regular @available:

  1. Type checker diagnoses when a client accidentally exposes such a symbol in library APIs.
  2. When emitting public interfaces, @_spi_available is printed as @available(platform, unavailable).
  3. ClangImporter imports ObjC macros SPI_AVAILABLE and __SPI_AVAILABLE to this attribute.

@nkcsgexi nkcsgexi changed the title [WIP] implement Swift version of SPI_IMPORT as @_spi_available [WIP] implement Swift version of SPI_AVAILABLE as @_spi_available Mar 5, 2022
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 5, 2022

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 5, 2022

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 5, 2022

@swift-ci please test

@nkcsgexi nkcsgexi changed the title [WIP] implement Swift version of SPI_AVAILABLE as @_spi_available Implement Swift version of SPI_AVAILABLE as @_spi_available Mar 6, 2022
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 6, 2022

@swift-ci please test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 6, 2022

@swift-ci please test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 6, 2022

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 6, 2022

@swift-ci please test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Mar 6, 2022

@swift-ci please test

@nkcsgexi nkcsgexi merged commit 610a4a5 into swiftlang:main Mar 6, 2022
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