Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Aug 9, 2023
1 parent 525980c commit 6b80bca
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions docs/UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b80bca

Please sign in to comment.