-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Swift backwards compat for the WiFiVersionType enum. (#28086)
* Fix Swift backwards compat for the WiFiVersionType enum. The names used to be like "80211a", which got exposed in Swift as "type80211a", then became "A". When the "A" names were non-deprecated and the "80211a" names were deprecated, Swift saw either just "A" or "A" and "type80211a"; I am not entirely clear which. Now that they are all deprecated, Swift by default sees "typeA" and "type80211a", which is compat-breaking. So annotate the "type80211*" names with SwiftName explicitly, which makes the auto-importer ignore them for purposes of determining the other names, and goes back to having "A" in Swift. * Also map the new enum values to lowercase, since that's more idiomatic for Swift.
- Loading branch information
1 parent
7a9621a
commit 1469964
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Name: Matter | ||
|
||
Enumerators: | ||
# The Swift importer seems to get very confused about | ||
# MTRWiFiNetworkDiagnosticsWiFiVersionType enum value naming depending on | ||
# which set of them is deprecated. Give explicit Swift names to the | ||
# older-deprecated bits, so the importer does the same thing it used to do | ||
# with the bits that got deprecated more recently. | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionType80211a | ||
SwiftName: type80211a | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionType80211b | ||
SwiftName: type80211b | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionType80211g | ||
SwiftName: type80211g | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionType80211n | ||
SwiftName: type80211n | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionType80211ac | ||
SwiftName: type80211ac | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionType80211ax | ||
SwiftName: type80211ax | ||
|
||
# Make the names for MTRWiFiNetworkDiagnosticsWiFiVersion all be | ||
# lowercase instead of having uppercase A and lowercase ax. | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionA | ||
SwiftName: a | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionB | ||
SwiftName: b | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionG | ||
SwiftName: g | ||
- Name: MTRWiFiNetworkDiagnosticsWiFiVersionN | ||
SwiftName: n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters