Skip to content

Commit 89f8f04

Browse files
authored
[BREAKING] Removed debugging_supported field from BoardDetails gRPC call (#2438)
* Removed debugging_supported field from BoardDetailsResponse * fix typo
1 parent a4e7eb4 commit 89f8f04

File tree

7 files changed

+178
-189
lines changed

7 files changed

+178
-189
lines changed

commands/board/details.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func Details(ctx context.Context, req *rpc.BoardDetailsRequest) (*rpc.BoardDetai
3939
return nil, &arduino.InvalidFQBNError{Cause: err}
4040
}
4141

42-
boardPackage, boardPlatformRelease, board, boardProperties, boardRefPlatform, err := pme.ResolveFQBN(fqbn)
42+
boardPackage, boardPlatformRelease, board, boardProperties, _, err := pme.ResolveFQBN(fqbn)
4343
if err != nil {
4444
return nil, &arduino.UnknownFQBNError{Cause: err}
4545
}
@@ -64,10 +64,6 @@ func Details(ctx context.Context, req *rpc.BoardDetailsRequest) (*rpc.BoardDetai
6464
details.BuildProperties, _ = utils.ExpandBuildProperties(details.GetBuildProperties())
6565
}
6666

67-
details.DebuggingSupported = boardProperties.ContainsKey("debug.executable") ||
68-
boardPlatformRelease.Properties.ContainsKey("debug.executable") ||
69-
(boardRefPlatform != nil && boardRefPlatform.Properties.ContainsKey("debug.executable"))
70-
7167
details.Package = &rpc.Package{
7268
Name: boardPackage.Name,
7369
Maintainer: boardPackage.Maintainer,

docs/UPGRADING.md

+12
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,18 @@ To address all the inconsistencies/inaccuracies we introduced two messages:
271271
- `PlatformMetadata` contains generic information about a platform (not correlated to a specific release).
272272
- `PlatformRelease` contains information about a specific release of a platform.
273273

274+
### `debugging_supported` field has been removed from gRPC `cc.arduino.cli.commands.v1.BoardDetails` and `board details` command in CLI
275+
276+
The `debugging_supported` field has been removed, since the possibility to debug is determined by:
277+
278+
- the board selected
279+
- the board option selected
280+
- the programmer selected
281+
282+
the `board details` command has no sufficient information to determine it. If you need to determine if a specific
283+
selection of board + option + programmer supports debugging, use the gRPC call
284+
`cc.arduino.cli.commands.v1.GetDebugConfig`: if the call is successful, it means that the debugging is supported.
285+
274286
## 0.35.0
275287

276288
### CLI `debug --info` changed JSON output.

internal/cli/board/details.go

-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ func (dr detailsResult) String() string {
139139
t.AddRow(tr("Board name:"), details.Name)
140140
t.AddRow(tr("FQBN:"), details.Fqbn)
141141
addIfNotEmpty(tr("Board version:"), details.Version)
142-
if details.DebuggingSupported {
143-
t.AddRow(tr("Debugging supported:"), table.NewCell("✔", color.New(color.FgGreen)))
144-
}
145142

146143
if details.Official {
147144
t.AddRow() // get some space from above

internal/cli/feedback/result/rpc.go

-2
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ type BoardDetailsResponse struct {
416416
ToolsDependencies []*ToolsDependency `json:"tools_dependencies,omitempty"`
417417
ConfigOptions []*ConfigOption `json:"config_options,omitempty"`
418418
Programmers []*Programmer `json:"programmers,omitempty"`
419-
DebuggingSupported bool `json:"debugging_supported,omitempty"`
420419
IdentificationProperties []*BoardIdentificationProperties `json:"identification_properties,omitempty"`
421420
BuildProperties []string `json:"build_properties,omitempty"`
422421
DefaultProgrammerID string `json:"default_programmer_id,omitempty"`
@@ -441,7 +440,6 @@ func NewBoardDetailsResponse(b *rpc.BoardDetailsResponse) *BoardDetailsResponse
441440
ToolsDependencies: NewToolsDependencies(b.GetToolsDependencies()),
442441
ConfigOptions: NewConfigOptions(b.GetConfigOptions()),
443442
Programmers: NewProgrammers(b.GetProgrammers()),
444-
DebuggingSupported: b.GetDebuggingSupported(),
445443
IdentificationProperties: NewBoardIdentificationProperties(b.GetIdentificationProperties()),
446444
BuildProperties: buildProperties,
447445
DefaultProgrammerID: b.GetDefaultProgrammerId(),

internal/integrationtest/board/board_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ func TestBoardDetails(t *testing.T) {
338338
"name": "Atmel SAM-ICE"
339339
}
340340
],
341-
"debugging_supported": true,
342341
"identification_properties": [
343342
{
344343
"properties": {

0 commit comments

Comments
 (0)