Skip to content

Commit 55012bf

Browse files
Stop using human-readable release names in Darwin availability.yaml. (#33677)
People are making assumptions based on those, and those assumptions will come back to bite them. Just switch to using UUIDs for the release names.
1 parent 452cad3 commit 55012bf

8 files changed

+78
-78
lines changed

src/darwin/Framework/CHIP/templates/MTRBaseClusters-src.zapt

+4-4
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ MTR{{cluster}}Cluster{{command}}Params
116116
{{! This is used as the implementation for both the new-name and old-name bits, so check for both here. }}
117117
{{#if (or (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))
118118
(and (isSupported (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))
119-
(wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))))}}
119+
(wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))))}}
120120
{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}}
121121
- (void)read{{>attribute}}With
122122
{{~#if_is_fabric_scoped_struct type~}}
@@ -223,15 +223,15 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value
223223
{{/if}}
224224
{{/unless}}
225225

226-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping name))
226+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping name))
227227
(isSupported (compatClusterNameRemapping name)))}}
228228
@implementation MTRBaseCluster{{compatClusterNameRemapping name}} (Deprecated)
229229

230230
{{#zcl_commands}}
231231
{{#if (is_str_equal source 'client')}}
232232
{{! Takes two arguments: cluster name and command name, plus the ambient state where the command is "this" }}
233233
{{#*inline "commandImpl"}}
234-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" cluster command=command)
234+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" cluster command=command)
235235
(isSupported cluster command=command))}}
236236
- (void){{asLowerCamelCase command}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler
237237
{
@@ -268,7 +268,7 @@ reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value
268268
{{/zcl_commands}}
269269

270270
{{#zcl_attributes_server removeKeys='isOptional'}}
271-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))
271+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))
272272
(isSupported (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name)))}}
273273
{{#*inline "attribute"}}Attribute{{compatAttributeNameRemapping parent.name name}}{{/inline}}
274274
- (void)read{{>attribute}}With

src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt

+21-21
Large diffs are not rendered by default.

src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt

+25-25
Large diffs are not rendered by default.

src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ MTR{{cluster}}Cluster{{command}}Params
103103
(isSupported "" globalAttribute=(asUpperCamelCase label preserveAcronyms=true)))
104104
(or (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))
105105
(and (isSupported (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))
106-
(wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name)))))}}
106+
(wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name)))))}}
107107
{{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}}
108108
{{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}}
109109
- (NSDictionary<NSString *, id> * _Nullable)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params {
@@ -143,7 +143,7 @@ MTR{{cluster}}Cluster{{command}}Params
143143
{{/if}}
144144
{{/unless}}
145145

146-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping name))
146+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping name))
147147
(isSupported (compatClusterNameRemapping name)))}}
148148
@implementation MTRCluster{{compatClusterNameRemapping name}} (Deprecated)
149149

@@ -156,7 +156,7 @@ MTR{{cluster}}Cluster{{command}}Params
156156
{{#if (is_str_equal source 'client')}}
157157
{{! Takes two arguments: cluster name and command name, plus the ambient state where the command is "this" }}
158158
{{#*inline "commandImpl"}}
159-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" cluster command=command)
159+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" cluster command=command)
160160
(isSupported cluster command=command))}}
161161
- (void){{asLowerCamelCase command}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler
162162
{

src/darwin/Framework/CHIP/templates/MTRClusters.zapt

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ NS_ASSUME_NONNULL_BEGIN
2424
{{! Takes two arguments: cluster name and command name, plus the ambient state where the command is "this" }}
2525
{{#*inline "commandDecl"}}
2626
{{#if (isSupported cluster command=command)}}
27-
- (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="First major API revamp"}};
27+
- (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}};
2828
{{#unless commandHasRequiredField}}
2929
- (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion
3030
{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }}
3131
{{#if (and (isStrEqual command "KeySetReadAllIndices")
3232
(isStrEqual cluster "GroupKeyManagement"))}}
33-
{{availability cluster command=command minimalRelease="Fall 2023"}};
33+
{{availability cluster command=command minimalRelease="3C23F160-13CE-4397-BC65-122B61E4D691"}};
3434
{{else}}
3535
{{#if (isInConfigList
3636
(concat (asUpperCamelCase cluster preserveAcronyms=true) "::" (asUpperCamelCase command preserveAcronyms=true))
3737
"LegacyCommandsWithOnlyOptionalArguments")}}
38-
{{availability cluster command=command minimalRelease="Early 2024"}};
38+
{{availability cluster command=command minimalRelease="ADDB2DC1-4701-4696-87EB-87CD1123BE1A"}};
3939
{{else}}
40-
{{availability cluster command=command minimalRelease="First major API revamp"}};
40+
{{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}};
4141
{{/if}}
4242
{{/if}}
4343
{{/unless}}
@@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN
8585
*/
8686
- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
8787
endpointID:(NSNumber *)endpointID
88-
queue:(dispatch_queue_t)queue {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="First major API revamp"}};
88+
queue:(dispatch_queue_t)queue {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}};
8989

9090
@end
9191

@@ -104,21 +104,21 @@ NS_ASSUME_NONNULL_BEGIN
104104
{{/zcl_clusters}}
105105

106106
{{#zcl_clusters}}
107-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping name))
107+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping name))
108108
(isSupported (compatClusterNameRemapping name)))}}
109109
@interface MTRCluster{{compatClusterNameRemapping name}} (Deprecated)
110110

111111
- (nullable instancetype)initWithDevice:(MTRDevice *)device
112112
endpoint:(uint16_t)endpoint
113-
queue:(dispatch_queue_t)queue {{availability (compatClusterNameRemapping name) deprecatedRelease="First major API revamp" deprecationMessage="Please use initWithDevice:endpoindID:queue:"}};
113+
queue:(dispatch_queue_t)queue {{availability (compatClusterNameRemapping name) deprecatedRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="Please use initWithDevice:endpoindID:queue:"}};
114114

115115
{{#zcl_commands}}
116116
{{#if (is_str_equal source 'client')}}
117117
{{! Takes two arguments: cluster name and command name, plus the ambient state where the command is "this" }}
118118
{{#*inline "commandDecl"}}
119-
{{#if (and (wasIntroducedBeforeRelease "First major API revamp" cluster command=command)
119+
{{#if (and (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" cluster command=command)
120120
(isSupported cluster command=command))}}
121-
- (void){{asLowerCamelCase command}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithParams:expectedValues:expectedValueInterval:completion:")}};
121+
- (void){{asLowerCamelCase command}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithParams:expectedValues:expectedValueInterval:completion:")}};
122122
{{#unless commandHasRequiredField}}
123123
{{! No need for these backwards-compat APIs for commands that never shipped them. }}
124124
{{#unless (isInConfigList
@@ -127,7 +127,7 @@ NS_ASSUME_NONNULL_BEGIN
127127
{{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }}
128128
{{#unless (and (isStrEqual cluster "GroupKeyManagement")
129129
(isStrEqual command "KeySetReadAllIndices"))}}
130-
- (void){{asLowerCamelCase command}}WithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithExpectedValues:expectedValueInterval:completion:")}};
130+
- (void){{asLowerCamelCase command}}WithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:({{>command_completion_type command=. compatRemapNames=true}})completionHandler {{availability cluster command=command deprecatedRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage=(concat "Please use " (asLowerCamelCase name) "WithExpectedValues:expectedValueInterval:completion:")}};
131131
{{/unless}}
132132
{{/unless}}
133133
{{/unless}}
@@ -140,7 +140,7 @@ NS_ASSUME_NONNULL_BEGIN
140140
{{~#zcl_attributes_server}}
141141
{{~#*inline "attributeDecls"}}
142142
{{#unless (isStrEqual attribute (asUpperCamelCase name preserveAcronyms=true))}}
143-
- (NSDictionary<NSString *, id> *)readAttribute{{attribute}}WithParams:(MTRReadParams * _Nullable)params {{availability cluster attribute=attribute deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use readAttribute" (asUpperCamelCase name preserveAcronyms=true) "WithParams on MTRCluster" (asUpperCamelCase parent.name preserveAcronyms=true))}};
143+
- (NSDictionary<NSString *, id> *)readAttribute{{attribute}}WithParams:(MTRReadParams * _Nullable)params {{availability cluster attribute=attribute deprecatedRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage=(concat "Please use readAttribute" (asUpperCamelCase name preserveAcronyms=true) "WithParams on MTRCluster" (asUpperCamelCase parent.name preserveAcronyms=true))}};
144144
{{#if (or isWritableAttribute
145145
(isInConfigList (concat (asUpperCamelCase parent.name) "::" label) "DarwinForceWritable"))}}
146146
- (void)writeAttribute{{attribute}}WithValue:(NSDictionary<NSString *, id> *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs {{availability cluster attribute=attribute deprecationMessage=(concat "Please use writeAttribute" (asUpperCamelCase name preserveAcronyms=true) "WithValue on MTRCluster" (asUpperCamelCase parent.name preserveAcronyms=true))}};

src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc-src.zapt

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
3131
{{>init_struct_member label=label type=type cluster=parent.parent.name}}
3232
{{/zcl_command_arguments}}
3333
{{#if (or (isStrEqual source "client")
34-
(wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)))}}
34+
(wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)))}}
3535
_timedInvokeTimeoutMs = nil;
3636
{{/if}}
3737
{{#if (isStrEqual source "client")}}
@@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
4949
other.{{asStructPropertyName label}} = self.{{asStructPropertyName label}};
5050
{{/zcl_command_arguments}}
5151
{{#if (or (isStrEqual source "client")
52-
(wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)))}}
52+
(wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name)))}}
5353
other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
5454
{{/if}}
5555
{{#if (isStrEqual source "client")}}
@@ -210,7 +210,7 @@ NS_ASSUME_NONNULL_BEGIN
210210
{{#if (isStrEqual source "client")}}
211211
@dynamic timedInvokeTimeoutMs;
212212
@dynamic serverSideProcessingTimeout;
213-
{{else if (wasIntroducedBeforeRelease "First major API revamp" cluster command=command)}}
213+
{{else if (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" cluster command=command)}}
214214
@dynamic timedInvokeTimeoutMs;
215215
{{/if}}
216216
@end

src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc.zapt

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
5555
@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
5656
{{! This is using the pre-renaming names for the isAvailableBefore test, because the pre-rename things inherit
5757
from the post-rename ones and need to have this selector.}}
58-
{{else if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name))}}
58+
{{else if (wasIntroducedBeforeRelease "267F4B03-3256-4056-A62D-5237640FDCFE" (compatClusterNameRemapping parent.name) command=(compatCommandNameRemapping parent.name name))}}
5959
/**
6060
* Controls whether the command is a timed command (using Timed Invoke).
6161
*
@@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN
8686
* schema for this command.
8787
*/
8888
- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
89-
error:(NSError * __autoreleasing *)error {{availability cluster command=command deprecationMessage="This command has been removed" minimalRelease="Fall 2023"}};
89+
error:(NSError * __autoreleasing *)error {{availability cluster command=command deprecationMessage="This command has been removed" minimalRelease="3C23F160-13CE-4397-BC65-122B61E4D691"}};
9090
{{/if}}
9191
@end
9292
{{/if}}

src/darwin/Framework/CHIP/templates/availability.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
# "provisional" to make sure all the things that should have
7373
# been omitted have been.
7474

75-
- release: "Initial release"
75+
- release: "0E17B7EB-314F-4264-BDA8-AD6A93120B15"
7676
versions:
7777
iOS: "16.1"
7878
macOS: "13.0"
@@ -4774,7 +4774,7 @@
47744774
- PulseWidthModulation
47754775
- TimeSynchronization
47764776

4777-
- release: "First dot-release"
4777+
- release: "FD8D09B4-6CF7-4EBA-BD4F-7EDE872E3098"
47784778
versions:
47794779
iOS: "16.2"
47804780
macOS: "13.1"
@@ -4830,7 +4830,7 @@
48304830
Descriptor:
48314831
DeviceTypeStruct: DeviceType
48324832

4833-
- release: "First major API revamp"
4833+
- release: "267F4B03-3256-4056-A62D-5237640FDCFE" # First major API revamp
48344834
versions:
48354835
iOS: "16.4"
48364836
macOS: "13.3"
@@ -6787,7 +6787,7 @@
67876787
HeatSetpointPresent: HeatSetpointFieldPresent
67886788
CoolSetpointPresent: CoolSetpointFieldPresent
67896789

6790-
- release: "First after major API revamp"
6790+
- release: "27C5E231-9EB5-4932-B4C1-10D88419D9CB" # First after major API revamp
67916791
versions:
67926792
iOS: "16.5"
67936793
macOS: "13.4"
@@ -7095,7 +7095,7 @@
70957095
PumpFeature:
70967096
LocalOperation: Local
70977097

7098-
- release: "Fall 2023"
7098+
- release: "3C23F160-13CE-4397-BC65-122B61E4D691"
70997099
versions:
71007100
iOS: "17.0"
71017101
macOS: "14.0"
@@ -7560,7 +7560,7 @@
75607560
- TimeFailure
75617561
- MissingTrustedTimeSource
75627562

7563-
- release: "Fall 2023 #2"
7563+
- release: "F7CA8603-6336-4E63-A216-30EE3F77CE8B"
75647564
versions:
75657565
iOS: "17.1"
75667566
macOS: "14.1"
@@ -7625,7 +7625,7 @@
76257625
- ProxyDiscovery
76267626
- ProxyValid
76277627

7628-
- release: "Fall 2023 #3"
7628+
- release: "A188F985-88AC-4F0B-8968-C887132CEF9E"
76297629
versions:
76307630
iOS: "17.2"
76317631
macOS: "14.2"
@@ -7771,7 +7771,7 @@
77717771
Feature:
77727772
DeadFrontBehavior: DeadFront
77737773

7774-
- release: "Early 2024"
7774+
- release: "ADDB2DC1-4701-4696-87EB-87CD1123BE1A"
77757775
versions:
77767776
iOS: "17.4"
77777777
macOS: "14.4"
@@ -8509,7 +8509,7 @@
85098509
ContentLaunchStatusEnum:
85108510
- URLNotAvailable
85118511

8512-
- release: "Middle of 2024"
8512+
- release: "FB974A56-BCF5-46CB-91EF-B5D096E84375"
85138513
versions:
85148514
iOS: "17.6"
85158515
macOS: "14.6"

0 commit comments

Comments
 (0)