Skip to content

Commit 670c880

Browse files
committed
Updated Docs
1 parent af90803 commit 670c880

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

docs/UPGRADING.md

+50
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,56 @@ field's optional nature (that is, it could be `true`, `false`, and `null` if not
182182

183183
Now the field is an `optional bool`, since the latest protobuf protocol changes now allows optional fields.
184184

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+
185235
### The gRPC `cc.arduino.cli.commands.v1.UpdateIndexResponse` and `UpdateLibrariesIndexResponse` have changed.
186236

187237
The responses coming from the update index commands:

0 commit comments

Comments
 (0)