From 1b60c97575140f33d921ea8ab1bfe2a6c8a0a700 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 9 Aug 2023 14:57:32 +0200 Subject: [PATCH] Updated docs --- docs/UPGRADING.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 31490513af2..3630ffb08e4 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -2,6 +2,60 @@ Here you can find a list of migration guides to handle breaking changes between releases of the CLI. +## 0.35.0 + +### The gRPC `cc.arduino.cli.commands.v1.UploadRepsonse` command response has been changed. + +Previously the `UploadResponse` was used only to stream the tool output: + +``` +message UploadResponse { + // The output of the upload process. + bytes out_stream = 1; + // The error output of the upload process. + bytes err_stream = 2; +} +``` + +Now the API logic has been clarified using the `oneof` clause and another field has been added providing an +`UploadResult` message that is sent when a successful upload completes. + +``` +message UploadResponse { + oneof message { + // The output of the upload process. + bytes out_stream = 1; + // The error output of the upload process. + bytes err_stream = 2; + // The upload result + UploadResult result = 3; + } +} + +message UploadResult { + // When a board requires a port disconnection to perform the upload, this + // field returns the port where the board reconnects after the upload. + Port updated_upload_port = 1; +} +``` + +### golang API: method `github.com/arduino/arduino-cli/commands/upload.Upload` changed signature + +The `Upload` method signature has been changed from: + +```go +func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, errStream io.Writer) error { ... } +``` + +to: + +```go +func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, errStream io.Writer) (*rpc.UploadResult, error) { ... } +``` + +Now an `UploadResult` structure is returned together with the error. If you are not interested in the information +contained in the structure you can safely ignore it. + ## 0.34.0 ### golang package `github.com/arduino/arduino-cli/inventory` removed from public API