Skip to content

Sema: Use internal import in fixits on public imports of private modules #76386

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 11, 2024

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Sep 10, 2024

The error about a public import of a private module is raised when a library-level API module imports a library-level SPI module with a public access-level and no @_implementationOnly or @_spiOnly attribute. Update the fixit to insert an internal instead of a @_implementationOnly, as internal imports are more reliable and encouraged over @_implementationOnly.

…ic imports of a private module

The error about a public import of a private module is raised when
a library-level API module imports a library-level SPI module without
a non-public access-level, `@_implementationOnly` attribute or
`@_spiOnly` attribute. Update the fixit to insert an `internal` instead
of a `@_implementationOnly`.
The test isn't mainly implementation-only anymore,
have the name reflect that.
… now

This was restricted to asserts to use Swift 6 mode.
@xymus
Copy link
Contributor Author

xymus commented Sep 10, 2024

@swift-ci Please smoke test

@xymus xymus requested a review from artemcm September 10, 2024 20:27
@xymus xymus changed the title Sema: Use internal import in fixits on a public imports of a private module Sema: Use internal import in fixits on public imports of private modules Sep 10, 2024
@xymus xymus merged commit 5ac817e into swiftlang:main Sep 11, 2024
3 checks passed
@xymus xymus deleted the public-import-of-private-fixit branch September 11, 2024 16:00
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.

2 participants