Skip to content

AST: Fix MemberImportVisibility handling of @_exported imports #75511

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
Jul 27, 2024

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Jul 26, 2024

In existing Swift, an @_exported import in any source file makes the declarations from the imported module visible in all source files. It's unclear whether this is an explicit decision or is simply and unintended consequence of effectively adding an implicit import to each source file for the module being compiled.

Although it's not clear whether this behavior is desirable, the behavior of member lookup when the MemberImportVisibility feature is enabled should align with it in order to avoid causing unnecessary churn in required imports.

Resolves rdar://132525152.

In existing Swift, an `@_exported import` in any source file makes the
declarations from the imported module visible in all source files. It's unclear
whether this is an explicit decision or is simply and unintended consequence of
effectively adding an implicit import to each source file for the module being
compiled.

Although it's not clear whether this behavior is desirable, the behavior of
member lookup when the MemberImportVisibility feature is enabled should align
with it in order to avoid causing unnecessary churn in required imports.

Resolves rdar://132525152.
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli
Copy link
Contributor Author

@swift-ci please smoke test Linux

@tshortli tshortli merged commit 5719fc9 into main Jul 27, 2024
3 checks passed
@tshortli tshortli deleted the member-import-visibility-exported-import branch July 27, 2024 00:44
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