Skip to content

Sema: track use of public imports by more extensions #71518

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 1 commit into from
Feb 11, 2024

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Feb 9, 2024

Consider extensions to imported types as users of a public import. This silences false reports of unused public imports in the case of an empty extension satisfying generic requirements via retroactive conformances. It also silences real reports of superfluously public imports used in internal extension, but this isn't very harmful at this time.

We should revisit this later and tighten the check, we should refactor the logic use to determine what makes an extension public.

rdar://120391841

@xymus xymus requested a review from tshortli February 9, 2024 21:10
@xymus
Copy link
Contributor Author

xymus commented Feb 9, 2024

@swift-ci Please smoke test

Consider extensions to imported types as users of a public import. This
silences false reports of unused public imports in the case of an empty
extension satisfying generic requirements via retroactive conformances.
It also silences real reports of superfluously public imports used in
internal extension, but this isn't very harmful at this time.

We should revisit this later and tighten the check, we should refactor
the logic use to determine what makes an extension public.

rdar://120391841
@xymus xymus force-pushed the superfluously-public-import-fixes2 branch from 5bfbe37 to e696b5f Compare February 9, 2024 23:29
@xymus
Copy link
Contributor Author

xymus commented Feb 9, 2024

@swift-ci Please smoke test

@xymus xymus merged commit 3039d1a into swiftlang:main Feb 11, 2024
@xymus xymus deleted the superfluously-public-import-fixes2 branch February 11, 2024 16:03
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