Skip to content

Commit 5b2f729

Browse files
committed
[BREAKING] Removed debugging_supported field from BoardDetails gRPC call (#2438)
* Removed debugging_supported field from BoardDetailsResponse * fix typo
1 parent 1d595cb commit 5b2f729

File tree

6 files changed

+180
-192
lines changed

6 files changed

+180
-192
lines changed

Diff for: commands/board/details.go

+1-8
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, boardPlatform, board, boardProperties, boardRefPlatform, err := pme.ResolveFQBN(fqbn)
42+
boardPackage, boardPlatform, board, boardProperties, _, err := pme.ResolveFQBN(fqbn)
4343
if err != nil {
4444
return nil, &arduino.UnknownFQBNError{Cause: err}
4545
}
@@ -64,13 +64,6 @@ func Details(ctx context.Context, req *rpc.BoardDetailsRequest) (*rpc.BoardDetai
6464
details.BuildProperties, _ = utils.ExpandBuildProperties(details.BuildProperties)
6565
}
6666

67-
details.DebuggingSupported = boardProperties.ContainsKey("debug.executable") ||
68-
boardPlatform.Properties.ContainsKey("debug.executable") ||
69-
(boardRefPlatform != nil && boardRefPlatform.Properties.ContainsKey("debug.executable")) ||
70-
// HOTFIX: Remove me when the `arduino:samd` core is updated
71-
boardPlatform.String() == "arduino:[email protected]" ||
72-
boardPlatform.String() == "arduino:[email protected]"
73-
7467
details.Package = &rpc.Package{
7568
Name: boardPackage.Name,
7669
Maintainer: boardPackage.Maintainer,

Diff for: docs/UPGRADING.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,19 @@
22

33
Here you can find a list of migration guides to handle breaking changes between releases of the CLI.
44

5-
## v0.35.0
5+
## 0.35.0
6+
7+
### `debugging_supported` field has been removed from gRPC `cc.arduino.cli.commands.v1.BoardDetails` and `board details` command in CLI
8+
9+
The `debugging_supported` field has been removed, since the possibility to debug is determined by:
10+
11+
- the board selected
12+
- the board option selected
13+
- the programmer selected
14+
15+
the `board details` command has no sufficient information to determine it. If you need to determine if a specific
16+
selection of board + option + programmer supports debugging, use the gRPC call
17+
`cc.arduino.cli.commands.v1.GetDebugConfig`: if the call is successful, it means that the debugging is supported.
618

719
### CLI `debug --info` changed JSON output.
820

Diff for: internal/cli/board/details.go

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

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

Diff for: internal/integrationtest/board/board_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,8 @@ func TestBoardDetails(t *testing.T) {
304304
_, _, err = cli.Run("core", "install", "arduino:[email protected]")
305305
require.NoError(t, err)
306306

307-
stdout, _, err = cli.Run("board", "details", "-b", "arduino:samd:nano_33_iot", "--format", "json")
307+
_, _, err = cli.Run("board", "details", "-b", "arduino:samd:nano_33_iot", "--format", "json")
308308
require.NoError(t, err)
309-
requirejson.Contains(t, stdout, `{"debugging_supported": true}`)
310309
}
311310

312311
func TestBoardDetailsNoFlags(t *testing.T) {

0 commit comments

Comments
 (0)