Skip to content

Commit 4d6b87d

Browse files
committed
Renamed field for clarity
1 parent 69327ad commit 4d6b87d

File tree

6 files changed

+90
-87
lines changed

6 files changed

+90
-87
lines changed

commands/debug/debug_info.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ func IsDebugSupported(ctx context.Context, req *rpc.IsDebugSupportedRequest) (*r
6363
}, pme, true)
6464
var x *arduino.FailedDebugError
6565
if errors.As(err, &x) {
66-
return &rpc.IsDebugSupportedResponse{Supported: false}, nil
66+
return &rpc.IsDebugSupportedResponse{DebuggingSupported: false}, nil
6767
}
6868
if err != nil {
6969
return nil, err
7070
}
71-
return &rpc.IsDebugSupportedResponse{Supported: true}, nil
71+
return &rpc.IsDebugSupportedResponse{DebuggingSupported: true}, nil
7272
}
7373

7474
func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Explorer, skipSketchChecks bool) (*rpc.GetDebugConfigResponse, error) {

internal/cli/debug/debug_check.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (d *debugCheckResult) Data() interface{} {
8282
}
8383

8484
func (d *debugCheckResult) String() string {
85-
if d.Result.Supported {
85+
if d.Result.DebuggingSupported {
8686
return tr("The given board/programmer configuration supports debugging.")
8787
}
8888
return tr("The given board/programmer configuration does NOT support debugging.")

internal/cli/feedback/result/rpc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1059,11 +1059,11 @@ func NewCompileDiagnosticNote(cdn *rpc.CompileDiagnosticNote) *CompileDiagnostic
10591059
}
10601060

10611061
type IsDebugSupportedResponse struct {
1062-
Supported bool `json:"supported"`
1062+
DebuggingSupported bool `json:"debugging_supported"`
10631063
}
10641064

10651065
func NewIsDebugSupportedResponse(resp *rpc.IsDebugSupportedResponse) *IsDebugSupportedResponse {
10661066
return &IsDebugSupportedResponse{
1067-
Supported: resp.GetSupported(),
1067+
DebuggingSupported: resp.GetDebuggingSupported(),
10681068
}
10691069
}

internal/integrationtest/debug/debug_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,13 @@ func testDebugCheck(t *testing.T, env *integrationtest.Environment, cli *integra
345345

346346
out, _, err = cli.Run("debug", "check", "-b", "arduino:samd:mkr1000", "-P", "atmel_ice", "--format", "json")
347347
require.NoError(t, err)
348-
requirejson.Query(t, out, `.supported`, `true`)
348+
requirejson.Query(t, out, `.debugging_supported`, `true`)
349349

350350
out, _, err = cli.Run("debug", "check", "-b", "arduino:avr:uno", "-P", "atmel_ice")
351351
require.NoError(t, err)
352352
require.Contains(t, string(out), "The given board/programmer configuration does NOT support debugging.")
353353

354354
out, _, err = cli.Run("debug", "check", "-b", "arduino:avr:uno", "-P", "atmel_ice", "--format", "json")
355355
require.NoError(t, err)
356-
requirejson.Query(t, out, `.supported`, `false`)
356+
requirejson.Query(t, out, `.debugging_supported`, `false`)
357357
}

rpc/cc/arduino/cli/commands/v1/debug.pb.go

+82-79
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/cc/arduino/cli/commands/v1/debug.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ message IsDebugSupportedRequest {
6868

6969
message IsDebugSupportedResponse {
7070
// True if debugging is supported
71-
bool supported = 1;
71+
bool debugging_supported = 1;
7272
}
7373

7474
message GetDebugConfigRequest {

0 commit comments

Comments
 (0)