Skip to content

[6.0] Make swift-syntax build without warnings #2571

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 27, 2024

@ahoppen ahoppen requested a review from bnbarham as a code owner March 27, 2024 09:41
@ahoppen
Copy link
Member Author

ahoppen commented Mar 27, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 27, 2024

swiftlang/swift#72621

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 27, 2024

swiftlang/swift#72621

@swift-ci Please test macOS

@ahoppen
Copy link
Member Author

ahoppen commented Mar 27, 2024

swiftlang/swift#72621

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2024

swiftlang/swift#72621

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2024

swiftlang/swift#72621

@swift-ci Please test macOS

ahoppen added 5 commits March 28, 2024 22:20
…ed version and deprecate a typealias

This allows us to still use the underscored version internally (eg. when matching the syntax node kind during the creation of a `SyntaxEnum` and keep swift-syntax building without warnings.
In most other parts of the code base we only use the SPI attribute for Swift ≥5.8 compilers. If we unconditionally mark a keywords as SPI we run into issues if a syntax node (which is only experimental in Swift 5.8+) uses that keyword as a default value in its initializers. The concrete case here is the usage of `.dependsOn`.
We were relying on the `nonisolated(unsafe)` annotation of `Info.info` to make `Sendable` checking pass. But that feature is only available in Swift 6.0. To be able to build swift-syntax without warnings using Swift <6.0, we need to use `@unchecked Sendable` here.
@ahoppen ahoppen force-pushed the ahoppen/6.0/fix-old-swift-diags branch from 956805e to bfc2878 Compare March 28, 2024 21:22
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2024

swiftlang/swift#72621

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 29, 2024

swiftlang/swift#72621

@swift-ci Please test Windows

@ahoppen ahoppen merged commit d12e37f into swiftlang:release/6.0 Mar 29, 2024
@ahoppen ahoppen deleted the ahoppen/6.0/fix-old-swift-diags branch March 29, 2024 22:18
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