|
2 | 2 |
|
3 | 3 | Here you can find a list of migration guides to handle breaking changes between releases of the CLI.
|
4 | 4 |
|
| 5 | +## 0.35.0 |
| 6 | + |
| 7 | +### The gRPC `cc.arduino.cli.commands.v1.UploadRepsonse` command response has been changed. |
| 8 | + |
| 9 | +Previously the `UploadResponse` was used only to stream the tool output: |
| 10 | + |
| 11 | +``` |
| 12 | +message UploadResponse { |
| 13 | + // The output of the upload process. |
| 14 | + bytes out_stream = 1; |
| 15 | + // The error output of the upload process. |
| 16 | + bytes err_stream = 2; |
| 17 | +} |
| 18 | +``` |
| 19 | + |
| 20 | +Now the API logic has been clarified using the `oneof` clause and another field has been added providing an |
| 21 | +`UploadResult` message that is sent when a successful upload completes. |
| 22 | + |
| 23 | +``` |
| 24 | +message UploadResponse { |
| 25 | + oneof message { |
| 26 | + // The output of the upload process. |
| 27 | + bytes out_stream = 1; |
| 28 | + // The error output of the upload process. |
| 29 | + bytes err_stream = 2; |
| 30 | + // The upload result |
| 31 | + UploadResult result = 3; |
| 32 | + } |
| 33 | +} |
| 34 | +
|
| 35 | +message UploadResult { |
| 36 | + // When a board requires a port disconnection to perform the upload, this |
| 37 | + // field returns the port where the board reconnects after the upload. |
| 38 | + Port updated_upload_port = 1; |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +### golang API: method `github.com/arduino/arduino-cli/commands/upload.Upload` changed signature |
| 43 | + |
| 44 | +The `Upload` method signature has been changed from: |
| 45 | + |
| 46 | +```go |
| 47 | +func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, errStream io.Writer) error { ... } |
| 48 | +``` |
| 49 | + |
| 50 | +to: |
| 51 | + |
| 52 | +```go |
| 53 | +func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, errStream io.Writer) (*rpc.UploadResult, error) { ... } |
| 54 | +``` |
| 55 | + |
| 56 | +Now an `UploadResult` structure is returned together with the error. If you are not interested in the information |
| 57 | +contained in the structure you can safely ignore it. |
| 58 | + |
5 | 59 | ## 0.34.0
|
6 | 60 |
|
7 | 61 | ### golang package `github.com/arduino/arduino-cli/inventory` removed from public API
|
|
0 commit comments