@@ -182,6 +182,56 @@ field's optional nature (that is, it could be `true`, `false`, and `null` if not
182
182
183
183
Now the field is an ` optional bool ` , since the latest protobuf protocol changes now allows optional fields.
184
184
185
+ ### Some gRPC responses messages now uses the ` oneof ` clause.
186
+
187
+ The following responses message:
188
+
189
+ - ` cc.arduino.cli.commands.v1.PlatformInstallResponse `
190
+ - ` cc.arduino.cli.commands.v1.PlatformDownloadResponse `
191
+ - ` cc.arduino.cli.commands.v1.PlatformUninstallResponse `
192
+ - ` cc.arduino.cli.commands.v1.PlatformUpgradeResponse `
193
+ - ` cc.arduino.cli.commands.v1.DebugResponse `
194
+ - ` cc.arduino.cli.commands.v1.LibraryDownloadResponse `
195
+ - ` cc.arduino.cli.commands.v1.LibraryInstallResponse `
196
+ - ` cc.arduino.cli.commands.v1.LibraryUpgradeResponse `
197
+ - ` cc.arduino.cli.commands.v1.LibraryUninstallResponse `
198
+ - ` cc.arduino.cli.commands.v1.LibraryUpgradeAllResponse `
199
+ - ` cc.arduino.cli.commands.v1.ZipLibraryInstallResponse `
200
+ - ` cc.arduino.cli.commands.v1.GitLibraryInstallResponse `
201
+ - ` cc.arduino.cli.commands.v1.MonitorResponse `
202
+
203
+ now use the ` oneof ` clause to make the stream nature of the message more explicit. Just to give an example, the
204
+ ` PlatformInstallResponse ` message has been changed from:
205
+
206
+ ``` proto
207
+ message PlatformInstallResponse {
208
+ // Progress of the downloads of the platform and tool files.
209
+ DownloadProgress progress = 1;
210
+ // Description of the current stage of the installation.
211
+ TaskProgress task_progress = 2;
212
+ }
213
+ ```
214
+
215
+ to:
216
+
217
+ ``` proto
218
+ message PlatformInstallResponse {
219
+ message Result {
220
+ // Empty message, reserved for future exapansion.
221
+ }
222
+ oneof message {
223
+ // Progress of the downloads of the platform and tool files.
224
+ DownloadProgress progress = 1;
225
+ // Description of the current stage of the installation.
226
+ TaskProgress task_progress = 2;
227
+ // The installation result.
228
+ Result result = 3;
229
+ }
230
+ }
231
+ ```
232
+
233
+ The other messages have been changed in a similar way.
234
+
185
235
### The gRPC ` cc.arduino.cli.commands.v1.UpdateIndexResponse ` and ` UpdateLibrariesIndexResponse ` have changed.
186
236
187
237
The responses coming from the update index commands:
0 commit comments