Commit 5b2f729a authored by Cristian Maglie's avatar Cristian Maglie

[BREAKING] Removed `debugging_supported` field from `BoardDetails` gRPC call (#2438)

* Removed debugging_supported field from BoardDetailsResponse

* fix typo
parent 1d595cb2
......@@ -39,7 +39,7 @@ func Details(ctx context.Context, req *rpc.BoardDetailsRequest) (*rpc.BoardDetai
return nil, &arduino.InvalidFQBNError{Cause: err}
}
boardPackage, boardPlatform, board, boardProperties, boardRefPlatform, err := pme.ResolveFQBN(fqbn)
boardPackage, boardPlatform, board, boardProperties, _, err := pme.ResolveFQBN(fqbn)
if err != nil {
return nil, &arduino.UnknownFQBNError{Cause: err}
}
......@@ -64,13 +64,6 @@ func Details(ctx context.Context, req *rpc.BoardDetailsRequest) (*rpc.BoardDetai
details.BuildProperties, _ = utils.ExpandBuildProperties(details.BuildProperties)
}
details.DebuggingSupported = boardProperties.ContainsKey("debug.executable") ||
boardPlatform.Properties.ContainsKey("debug.executable") ||
(boardRefPlatform != nil && boardRefPlatform.Properties.ContainsKey("debug.executable")) ||
// HOTFIX: Remove me when the `arduino:samd` core is updated
boardPlatform.String() == "arduino:samd@1.8.9" ||
boardPlatform.String() == "arduino:samd@1.8.8"
details.Package = &rpc.Package{
Name: boardPackage.Name,
Maintainer: boardPackage.Maintainer,
......
......@@ -2,7 +2,19 @@
Here you can find a list of migration guides to handle breaking changes between releases of the CLI.
## v0.35.0
## 0.35.0
### `debugging_supported` field has been removed from gRPC `cc.arduino.cli.commands.v1.BoardDetails` and `board details` command in CLI
The `debugging_supported` field has been removed, since the possibility to debug is determined by:
- the board selected
- the board option selected
- the programmer selected
the `board details` command has no sufficient information to determine it. If you need to determine if a specific
selection of board + option + programmer supports debugging, use the gRPC call
`cc.arduino.cli.commands.v1.GetDebugConfig`: if the call is successful, it means that the debugging is supported.
### CLI `debug --info` changed JSON output.
......
......@@ -138,9 +138,6 @@ func (dr detailsResult) String() string {
t.AddRow(tr("Board name:"), details.Name)
t.AddRow(tr("FQBN:"), details.Fqbn)
addIfNotEmpty(tr("Board version:"), details.Version)
if details.GetDebuggingSupported() {
t.AddRow(tr("Debugging supported:"), table.NewCell("✔", color.New(color.FgGreen)))
}
if details.Official {
t.AddRow() // get some space from above
......
......@@ -304,9 +304,8 @@ func TestBoardDetails(t *testing.T) {
_, _, err = cli.Run("core", "install", "arduino:samd@1.8.8")
require.NoError(t, err)
stdout, _, err = cli.Run("board", "details", "-b", "arduino:samd:nano_33_iot", "--format", "json")
_, _, err = cli.Run("board", "details", "-b", "arduino:samd:nano_33_iot", "--format", "json")
require.NoError(t, err)
requirejson.Contains(t, stdout, `{"debugging_supported": true}`)
}
func TestBoardDetailsNoFlags(t *testing.T) {
......
This diff is collapsed.
......@@ -59,8 +59,7 @@ message BoardDetailsResponse {
repeated ConfigOption config_options = 11;
// List of programmers supported by the board
repeated Programmer programmers = 13;
// Set to true if the board supports debugging
bool debugging_supported = 14;
reserved 14;
// Identifying information for the board (e.g., USB VID/PID).
repeated BoardIdentificationProperties identification_properties = 15;
// Board build properties used for compiling
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment