diff --git a/arduino/cores/cores.go b/arduino/cores/cores.go index 0c6fb37178e..a03d9875db8 100644 --- a/arduino/cores/cores.go +++ b/arduino/cores/cores.go @@ -75,7 +75,7 @@ type PlatformRelease struct { PluggableDiscoveryAware bool `json:"-"` // true if the Platform supports pluggable discovery (no compatibility layer required) Monitors map[string]*MonitorDependency `json:"-"` MonitorsDevRecipes map[string]string `json:"-"` - Incompatible bool `json:"-"` // true if at least one ToolDependencies is not available for the current OS/ARCH. + Compatible bool `json:"-"` // true if at all ToolDependencies are available for the current OS/ARCH. } // BoardManifest contains information about a board. These metadata are usually @@ -238,7 +238,7 @@ func (platform *Platform) GetLatestCompatibleRelease() *PlatformRelease { } maximum := &PlatformRelease{Version: &semver.Version{}} for _, release := range platform.Releases { - if release.Incompatible { + if !release.IsCompatible() { continue } if release.Version.GreaterThan(maximum.Version) { @@ -278,7 +278,7 @@ func (platform *Platform) GetAllReleasesVersions() []*semver.Version { func (platform *Platform) GetAllCompatibleReleasesVersions() []*semver.Version { versions := []*semver.Version{} for _, release := range platform.Releases { - if release.Incompatible { + if !release.IsCompatible() { continue } versions = append(versions, release.Version) @@ -477,8 +477,8 @@ func (release *PlatformRelease) HasMetadata() bool { return installedJSONPath.Exist() } -// IsIncompatible returns true if the PlatformRelease contains tool -// dependencies that are not available in the current OS/ARCH. -func (release *PlatformRelease) IsIncompatible() bool { - return release.Incompatible +// IsCompatible returns true if all the tools dependencies of a PlatformRelease +// are available in the current OS/ARCH. +func (release *PlatformRelease) IsCompatible() bool { + return release.Compatible } diff --git a/arduino/cores/packagemanager/package_manager.go b/arduino/cores/packagemanager/package_manager.go index afa57f5871a..1f2b380e08a 100644 --- a/arduino/cores/packagemanager/package_manager.go +++ b/arduino/cores/packagemanager/package_manager.go @@ -121,37 +121,37 @@ func (pmb *Builder) Build() *PackageManager { } } -func (pmb *Builder) calculateIncompatibleVersions() { - // calculates Incompatible PlatformRelease +// calculate Compatible PlatformRelease +func (pmb *Builder) calculateCompatibleReleases() { for _, op := range pmb.packages { for _, p := range op.Platforms { for _, pr := range p.Releases { - platformHasIncompatibleTools := func() bool { + platformHasAllCompatibleTools := func() bool { for _, td := range pr.ToolDependencies { if td == nil { - return true + return false } _, ok := pmb.packages[td.ToolPackager] if !ok { - return true + return false } tool := pmb.packages[td.ToolPackager].Tools[td.ToolName] if tool == nil { - return true + return false } tr := tool.Releases[td.ToolVersion.NormalizedString()] if tr == nil { - return true + return false } if tr.GetCompatibleFlavour() == nil { - return true + return false } } - return false + return true } - pr.Incompatible = platformHasIncompatibleTools() + pr.Compatible = platformHasAllCompatibleTools() } } } @@ -164,7 +164,7 @@ func (pmb *Builder) calculateIncompatibleVersions() { func (pm *PackageManager) NewBuilder() (builder *Builder, commit func()) { pmb := NewBuilder(pm.IndexDir, pm.PackagesDir, pm.DownloadDir, pm.tempDir, pm.userAgent) return pmb, func() { - pmb.calculateIncompatibleVersions() + pmb.calculateCompatibleReleases() pmb.BuildIntoExistingPackageManager(pm) } } diff --git a/arduino/cores/packagemanager/package_manager_test.go b/arduino/cores/packagemanager/package_manager_test.go index c02fa34eaa6..8a5fc877850 100644 --- a/arduino/cores/packagemanager/package_manager_test.go +++ b/arduino/cores/packagemanager/package_manager_test.go @@ -744,6 +744,7 @@ func TestFindToolsRequiredFromPlatformRelease(t *testing.T) { func TestFindPlatformReleaseDependencies(t *testing.T) { pmb := NewBuilder(nil, nil, nil, nil, "test") pmb.LoadPackageIndexFromFile(paths.New("testdata", "package_tooltest_index.json")) + pmb.calculateCompatibleReleases() pm := pmb.Build() pme, release := pm.NewExplorer() defer release() diff --git a/commands/core.go b/commands/core.go index 2519401e067..1881519ef38 100644 --- a/commands/core.go +++ b/commands/core.go @@ -74,6 +74,6 @@ func PlatformReleaseToRPC(platformRelease *cores.PlatformRelease) *rpc.PlatformR MissingMetadata: missingMetadata, Type: []string{platformRelease.Category}, Deprecated: platformRelease.Deprecated, - Incompatible: platformRelease.IsIncompatible(), + Compatible: platformRelease.IsCompatible(), } } diff --git a/commands/core/search_test.go b/commands/core/search_test.go index b3e57859cdc..2babe57ea81 100644 --- a/commands/core/search_test.go +++ b/commands/core/search_test.go @@ -61,22 +61,22 @@ func TestPlatformSearch(t *testing.T) { }, Releases: map[string]*rpc.PlatformRelease{ "1.0.5": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.5", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.5", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, "1.0.6": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.6", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.6", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, }, InstalledVersion: "", @@ -103,13 +103,13 @@ func TestPlatformSearch(t *testing.T) { }, Releases: map[string]*rpc.PlatformRelease{ "1.0.6": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.6", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.6", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, }, InstalledVersion: "", @@ -136,22 +136,22 @@ func TestPlatformSearch(t *testing.T) { }, Releases: map[string]*rpc.PlatformRelease{ "1.0.5": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.5", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.5", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, "1.0.6": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.6", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.6", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, }, InstalledVersion: "", @@ -178,22 +178,22 @@ func TestPlatformSearch(t *testing.T) { }, Releases: map[string]*rpc.PlatformRelease{ "1.0.5": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.5", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.5", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, "1.0.6": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.6", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.6", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, }, InstalledVersion: "", @@ -220,22 +220,22 @@ func TestPlatformSearch(t *testing.T) { }, Releases: map[string]*rpc.PlatformRelease{ "1.0.5": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.5", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.5", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, "1.0.6": { - Name: "RK002", - Type: []string{"Contributed"}, - Installed: false, - Version: "1.0.6", - Boards: []*rpc.Board{{Name: "RK002"}}, - Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, - Incompatible: true, + Name: "RK002", + Type: []string{"Contributed"}, + Installed: false, + Version: "1.0.6", + Boards: []*rpc.Board{{Name: "RK002"}}, + Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, + Compatible: false, }, }, InstalledVersion: "", @@ -294,8 +294,8 @@ func TestPlatformSearch(t *testing.T) { {Name: "Arduino Industrial 101"}, {Name: "Linino One"}, }, - Help: &rpc.HelpResources{Online: "http://www.arduino.cc/en/Reference/HomePage"}, - Incompatible: true, + Help: &rpc.HelpResources{Online: "http://www.arduino.cc/en/Reference/HomePage"}, + Compatible: false, }, }, InstalledVersion: "", @@ -354,8 +354,8 @@ func TestPlatformSearch(t *testing.T) { {Name: "Arduino Industrial 101"}, {Name: "Linino One"}, }, - Help: &rpc.HelpResources{Online: "http://www.arduino.cc/en/Reference/HomePage"}, - Incompatible: true, + Help: &rpc.HelpResources{Online: "http://www.arduino.cc/en/Reference/HomePage"}, + Compatible: false, }, }, InstalledVersion: "", diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 734c38a3eba..11bbbbdea4d 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -6,9 +6,9 @@ Here you can find a list of migration guides to handle breaking changes between ### The gRPC `cc.arduino.cli.commands.v1.PlatformRelease` has been changed. -We've added a new field called `incompatible`. This field indicates if the current platform release is installable or -not. It may happen that a platform doesn't have a dependency available for an OS, in such cases, if we try to install -the platform it will fail. The new field can be used to know upfront if a specific release is installable. +We've added a new field called `compatible`. This field indicates if the current platform release is installable or not. +It may happen that a platform doesn't have a dependency available for an OS, in such cases, if we try to install the +platform it will fail. The new field can be used to know upfront if a specific release is installable. ### The gRPC `cc.arduino.cli.commands.v1.PlatformSummary` has been changed. diff --git a/internal/cli/feedback/result/rpc.go b/internal/cli/feedback/result/rpc.go index 38e6db164a6..5c74d4fc473 100644 --- a/internal/cli/feedback/result/rpc.go +++ b/internal/cli/feedback/result/rpc.go @@ -100,7 +100,7 @@ func NewPlatformReleaseResult(in *rpc.PlatformRelease) *PlatformRelease { Help: help, MissingMetadata: in.MissingMetadata, Deprecated: in.Deprecated, - Incompatible: in.Incompatible, + Compatible: in.Compatible, } return res } @@ -115,7 +115,7 @@ type PlatformRelease struct { Help *HelpResource `json:"help,omitempty"` MissingMetadata bool `json:"missing_metadata,omitempty"` Deprecated bool `json:"deprecated,omitempty"` - Incompatible bool `json:"incompatible,omitempty"` + Compatible bool `json:"compatible"` } // Board maps a rpc.Board diff --git a/internal/integrationtest/core/core_test.go b/internal/integrationtest/core/core_test.go index c22b1e8e56a..501940bbade 100644 --- a/internal/integrationtest/core/core_test.go +++ b/internal/integrationtest/core/core_test.go @@ -1174,11 +1174,11 @@ func TestCoreHavingIncompatibleDepTools(t *testing.T) { stdout, _, err = cli.Run("core", "search", "--all", "--format", "json", additionalURLs) require.NoError(t, err) requirejson.Query(t, stdout, - `[.[] | select(.id == "foo_vendor:avr") | .releases | map(.) | .[] | {version: .version, incompatible: .incompatible}] | sort_by(.version)`, + `[.[] | select(.id == "foo_vendor:avr") | .releases | map(.) | .[] | {version: .version, compatible: .compatible}] | sort_by(.version)`, `[ - {"incompatible":null,"version":"1.0.0"}, - {"incompatible":null,"version":"1.0.1"}, - {"incompatible":true,"version":"1.0.2"} + {"compatible":true,"version":"1.0.0"}, + {"compatible":true,"version":"1.0.1"}, + {"compatible":false,"version":"1.0.2"} ]`, ) @@ -1186,7 +1186,7 @@ func TestCoreHavingIncompatibleDepTools(t *testing.T) { stdout, _, err = cli.Run("core", "search", "--format", "json", additionalURLs) require.NoError(t, err) requirejson.Query(t, stdout, `.[] | select(.id == "foo_vendor:avr") | .latest_version`, `"1.0.2"`) - requirejson.Query(t, stdout, `.[] | select(.id == "incompatible_vendor:avr") | .releases[.latest_version].incompatible`, `true`) + requirejson.Query(t, stdout, `.[] | select(.id == "incompatible_vendor:avr") | .releases[.latest_version].compatible`, `false`) // In text mode, core search doesn't show any version if no compatible one are present stdout, _, err = cli.Run("core", "search", additionalURLs) diff --git a/rpc/cc/arduino/cli/commands/v1/common.pb.go b/rpc/cc/arduino/cli/commands/v1/common.pb.go index e099750d0b8..66f1cd1d14b 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.pb.go +++ b/rpc/cc/arduino/cli/commands/v1/common.pb.go @@ -771,8 +771,9 @@ type PlatformRelease struct { MissingMetadata bool `protobuf:"varint,7,opt,name=missing_metadata,json=missingMetadata,proto3" json:"missing_metadata,omitempty"` // True this release is deprecated Deprecated bool `protobuf:"varint,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - // True if the platform contains an incompatible dependency. - Incompatible bool `protobuf:"varint,9,opt,name=incompatible,proto3" json:"incompatible,omitempty"` + // True if the platform dependencies are available for the current OS. This + // also means that the platform is installable. + Compatible bool `protobuf:"varint,9,opt,name=compatible,proto3" json:"compatible,omitempty"` } func (x *PlatformRelease) Reset() { @@ -863,9 +864,9 @@ func (x *PlatformRelease) GetDeprecated() bool { return false } -func (x *PlatformRelease) GetIncompatible() bool { +func (x *PlatformRelease) GetCompatible() bool { if x != nil { - return x.Incompatible + return x.Compatible } return false } @@ -1211,7 +1212,7 @@ var file_cc_arduino_cli_commands_v1_common_proto_rawDesc = []byte{ 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x65, 0x64, 0x22, 0xda, 0x02, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x78, 0x65, 0x64, 0x22, 0xd6, 0x02, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, @@ -1230,32 +1231,32 @@ var file_cc_arduino_cli_commands_v1_common_proto_rawDesc = []byte{ 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0c, - 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, - 0x22, 0x88, 0x01, 0x0a, 0x1a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x2f, 0x0a, 0x05, 0x42, - 0x6f, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x22, 0x31, 0x0a, 0x07, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, - 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x22, - 0x27, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, - 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, - 0x63, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x88, 0x01, 0x0a, + 0x1a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x5f, 0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x2f, 0x0a, 0x05, 0x42, 0x6f, 0x61, 0x72, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x22, 0x31, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x62, 0x6e, 0x22, 0x27, 0x0a, 0x0d, 0x48, + 0x65, 0x6c, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x63, 0x2f, 0x61, 0x72, + 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x63, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/rpc/cc/arduino/cli/commands/v1/common.proto b/rpc/cc/arduino/cli/commands/v1/common.proto index 1a355ea57c1..13befb5bf82 100644 --- a/rpc/cc/arduino/cli/commands/v1/common.proto +++ b/rpc/cc/arduino/cli/commands/v1/common.proto @@ -144,8 +144,9 @@ message PlatformRelease { bool missing_metadata = 7; // True this release is deprecated bool deprecated = 8; - // True if the platform contains an incompatible dependency. - bool incompatible = 9; + // True if the platform dependencies are available for the current OS. This + // also means that the platform is installable. + bool compatible = 9; } message InstalledPlatformReference {