Skip to content

ModuleInterface: prepare to accept access-level on imports in swiftinterfaces #68523

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 15, 2023

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Sep 14, 2023

This adds forward looking support for swiftinterfaces and the Access-levels on import features. Ensure the compiler accepts future swiftinterfaces using access-level keywords on imports without the flag. And print the public access-level keyword in Swift 6 mode.

While use of access-level in imports is still gated by a flag for normal
source code, accept it in swiftinterfaces without the flag. This will
make it easier for older compilers to read newer swiftinterfaces created
by a future compiler where that restriction is lifted.

rdar://115455383
If the access-level on imports proposal is accepted as written, all
imports printed in swiftinterfaces will be `public`. Whether or not we
require the explicit `public` keyword in Swift 6 mode, printing it will
have no downside. It also goes along with the mentality that
swiftinterfaces should be more explicit than implicit.

rdar://115455383
@xymus
Copy link
Contributor Author

xymus commented Sep 14, 2023

@swift-ci Please smoke test

@tshortli
Copy link
Contributor

To minimize condfails I think it could be helpful to cherry pick this very targeted change back to release/5.10.

@xymus
Copy link
Contributor Author

xymus commented Sep 14, 2023

@swift-ci Please smoke test

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.

3 participants