Skip to content

Set Swift language version to 5 #79499

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 20, 2025

Conversation

etcwilde
Copy link
Member

The swift version impacts how swift interfaces work so it's important that we set this explicitly on Apple platforms. Setting it explicitly now.

rdar://145118843

@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde etcwilde force-pushed the ewilde/apple-swift-version-5 branch from d7e42b0 to 94995b7 Compare February 19, 2025 22:57
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@compnerd
Copy link
Member

This was previously being set on all platforms - should we just default this globally rather than squirrel it away in a cache file?

@etcwilde etcwilde force-pushed the ewilde/apple-swift-version-5 branch from 94995b7 to 996e65e Compare February 20, 2025 00:57
The stdlib needs to build in Swift-5 mode, and ensure that
`-swift-verion 5` be included in the commandline explicitly. While the
compiler defaults to 5 mode, if it's not included explicitly, it won't
be included in the swift interface, which then means that modules that
import it will influence how the textual interface is processed.
The interface for the stdlib must be processed in the Swift 5 language
mode due to sendability. Set it explicitly to ensure that importing
modules do not change the Swift language mode.

Fixes: rdar://145118843
@etcwilde etcwilde force-pushed the ewilde/apple-swift-version-5 branch from 996e65e to ebc0a37 Compare February 20, 2025 00:57
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@edymtt
Copy link
Contributor

edymtt commented Feb 20, 2025

@swift-ci please smoke test Windows

@etcwilde etcwilde merged commit b1fb62d into swiftlang:main Feb 20, 2025
3 checks passed
@etcwilde etcwilde deleted the ewilde/apple-swift-version-5 branch February 20, 2025 22:20
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.

5 participants