Skip to content

Conversation

@tshortli
Copy link
Contributor

When building with CMake during the Swift compiler build, the libraries in this package are built with library evolution enabled. That causes the compiler to emit diagnostics that encourage use of @unknown default to handle unknown cases that might be added in the future. Silence these warnings by adding @unknown default cases where they are missing. Guard these with the RESILIENT_LIBRARIES compilation condition to avoid triggering a Default will never be executed diagnostic during the package build.

Note that this would not be required if _RegexParser could always build without library evolution, but that change had to be reverted (rdar://124541877).

…known values` warnings.

When building with CMake during the Swift compiler build, the libraries in
this package are built with library evolution enabled. That causes the compiler
to emit diagnostics that encourage use of `@unknown default` to handle unknown
cases that might be added in the future. Silence these warnings by adding
`@unknown default` cases where they are missing. Guard these with the
`RESILIENT_LIBRARIES` compilation condition to avoid triggering a `Default will
never be executed` diagnostic during the package build.

Note that this would not be required if `_RegexParser` could always build
without library evolution, but that change had to be reverted
(rdar://124541877).
@tshortli
Copy link
Contributor Author

swiftlang/swift#72333

@swift-ci please test

@tshortli
Copy link
Contributor Author

In order to get this in before the branch I'm going to ask for forgiveness instead of permission and land it now. If anyone has feedback let me know, I'm happy to follow up.

@tshortli tshortli merged commit cd0ce57 into swiftlang:main Mar 15, 2024
@tshortli tshortli deleted the unknown-default branch March 15, 2024 05:23
@tshortli tshortli restored the unknown-default branch March 15, 2024 16:18
@tshortli tshortli deleted the unknown-default branch March 15, 2024 16: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.

1 participant