Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
b72f5ca7
Unverified
Commit
b72f5ca7
authored
May 30, 2024
by
Cristian Maglie
Committed by
GitHub
May 30, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[breaking] Renamed gRPC field `cc.arduino.cli.commands.v1.PlatformRelease.type` to `types` (#2620)
parent
81d517b3
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
92 deletions
+128
-92
commands/service_platform_search_test.go
commands/service_platform_search_test.go
+10
-10
commands/utility_core.go
commands/utility_core.go
+1
-1
docs/UPGRADING.md
docs/UPGRADING.md
+36
-0
internal/cli/feedback/result/rpc.go
internal/cli/feedback/result/rpc.go
+2
-2
rpc/cc/arduino/cli/commands/v1/common.pb.go
rpc/cc/arduino/cli/commands/v1/common.pb.go
+78
-78
rpc/cc/arduino/cli/commands/v1/common.proto
rpc/cc/arduino/cli/commands/v1/common.proto
+1
-1
No files found.
commands/service_platform_search_test.go
View file @
b72f5ca7
...
...
@@ -70,7 +70,7 @@ func TestPlatformSearch(t *testing.T) {
Releases
:
map
[
string
]
*
rpc
.
PlatformRelease
{
"1.0.5"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.5"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -79,7 +79,7 @@ func TestPlatformSearch(t *testing.T) {
},
"1.0.6"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.6"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -110,7 +110,7 @@ func TestPlatformSearch(t *testing.T) {
Releases
:
map
[
string
]
*
rpc
.
PlatformRelease
{
"1.0.5"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.5"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -119,7 +119,7 @@ func TestPlatformSearch(t *testing.T) {
},
"1.0.6"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.6"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -150,7 +150,7 @@ func TestPlatformSearch(t *testing.T) {
Releases
:
map
[
string
]
*
rpc
.
PlatformRelease
{
"1.0.5"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.5"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -159,7 +159,7 @@ func TestPlatformSearch(t *testing.T) {
},
"1.0.6"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.6"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -190,7 +190,7 @@ func TestPlatformSearch(t *testing.T) {
Releases
:
map
[
string
]
*
rpc
.
PlatformRelease
{
"1.0.5"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.5"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -199,7 +199,7 @@ func TestPlatformSearch(t *testing.T) {
},
"1.0.6"
:
{
Name
:
"RK002"
,
Type
:
[]
string
{
"Contributed"
},
Type
s
:
[]
string
{
"Contributed"
},
Installed
:
false
,
Version
:
"1.0.6"
,
Boards
:
[]
*
rpc
.
Board
{{
Name
:
"RK002"
}},
...
...
@@ -230,7 +230,7 @@ func TestPlatformSearch(t *testing.T) {
Releases
:
map
[
string
]
*
rpc
.
PlatformRelease
{
"1.8.3"
:
{
Name
:
"Arduino AVR Boards"
,
Type
:
[]
string
{
"Arduino"
},
Type
s
:
[]
string
{
"Arduino"
},
Installed
:
false
,
Version
:
"1.8.3"
,
Boards
:
[]
*
rpc
.
Board
{
...
...
@@ -288,7 +288,7 @@ func TestPlatformSearch(t *testing.T) {
Releases
:
map
[
string
]
*
rpc
.
PlatformRelease
{
"1.8.3"
:
{
Name
:
"Arduino AVR Boards"
,
Type
:
[]
string
{
"Arduino"
},
Type
s
:
[]
string
{
"Arduino"
},
Installed
:
false
,
Version
:
"1.8.3"
,
Boards
:
[]
*
rpc
.
Board
{
...
...
commands/utility_core.go
View file @
b72f5ca7
...
...
@@ -72,7 +72,7 @@ func platformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.PlatformR
Version
:
platformRelease
.
Version
.
String
(),
Installed
:
platformRelease
.
IsInstalled
(),
MissingMetadata
:
missingMetadata
,
Type
:
[]
string
{
platformRelease
.
Category
},
Type
s
:
[]
string
{
platformRelease
.
Category
},
Deprecated
:
platformRelease
.
Deprecated
,
Compatible
:
platformRelease
.
IsCompatible
(),
}
...
...
docs/UPGRADING.md
View file @
b72f5ca7
...
...
@@ -181,6 +181,42 @@ func main() {
The
`yaml`
option of the
`--format`
flag is no more supported. Use
`--format json`
if machine parsable output is needed.
### gRPC: The `type` field has been renamed to `types` in the `cc.arduino.cli.commands.v1.PlatformRelease` message.
Rebuilding the gRPC bindings from the proto files requires to rename all access to
`type`
field as
`types`
.
By the way, the wire protocol is not affected by this change, existing clients should work fine without modification.
### The `type` field has been renamed to `types` in the JSON output including a platform release.
Since the
`type`
field may contain multiple values has been renamed to
`types`
to better express this aspect.
Previously:
```
$ arduino-cli core list --json | jq '.platforms[4].releases."1.8.13"'
{
"name": "Arduino SAMD (32-bits ARM Cortex-M0+) Boards",
"version": "1.8.13",
"type": [
"Arduino"
],
...
```
Now:
```
$ arduino-cli core list --json | jq '.platforms[4].releases."1.8.13"'
{
"name": "Arduino SAMD (32-bits ARM Cortex-M0+) Boards",
"version": "1.8.13",
"types": [
"Arduino"
],
...
```
### The gRPC `cc.arduino.cli.commands.v1.CompileRequest.export_binaries` changed type.
Previously the field
`export_binaries`
was a
`google.protobuf.BoolValue`
. We used this type because it expresses this
...
...
internal/cli/feedback/result/rpc.go
View file @
b72f5ca7
...
...
@@ -117,7 +117,7 @@ func NewPlatformRelease(in *rpc.PlatformRelease) *PlatformRelease {
res
:=
&
PlatformRelease
{
Name
:
in
.
GetName
(),
Version
:
in
.
GetVersion
(),
Type
:
in
.
GetType
(),
Type
s
:
in
.
GetTypes
(),
Installed
:
in
.
GetInstalled
(),
Boards
:
boards
,
Help
:
help
,
...
...
@@ -132,7 +132,7 @@ func NewPlatformRelease(in *rpc.PlatformRelease) *PlatformRelease {
type
PlatformRelease
struct
{
Name
string
`json:"name,omitempty"`
Version
string
`json:"version,omitempty"`
Type
[]
string
`json:"type
,omitempty"`
Type
s
[]
string
`json:"types
,omitempty"`
Installed
bool
`json:"installed,omitempty"`
Boards
[]
*
Board
`json:"boards,omitempty"`
Help
*
HelpResource
`json:"help,omitempty"`
...
...
rpc/cc/arduino/cli/commands/v1/common.pb.go
View file @
b72f5ca7
This diff is collapsed.
Click to expand it.
rpc/cc/arduino/cli/commands/v1/common.proto
View file @
b72f5ca7
...
...
@@ -129,7 +129,7 @@ message PlatformRelease {
// Version of the platform release
string
version
=
2
;
// Type of the platform.
repeated
string
type
=
3
;
repeated
string
type
s
=
3
;
// True if the platform is installed
bool
installed
=
4
;
// List of boards provided by the platform. If the platform is installed,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment