@@ -29,7 +29,7 @@ import (
29
29
"github.com/arduino/arduino-cli/commands"
30
30
"github.com/arduino/arduino-cli/executils"
31
31
"github.com/arduino/arduino-cli/i18n"
32
- dbg "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/debug /v1"
32
+ rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands /v1"
33
33
"github.com/arduino/go-paths-helper"
34
34
"github.com/sirupsen/logrus"
35
35
)
@@ -42,7 +42,7 @@ var tr = i18n.Tr
42
42
// grpc Out <- tool stdOut
43
43
// grpc Out <- tool stdErr
44
44
// It also implements tool process lifecycle management
45
- func Debug (ctx context.Context , req * dbg. DebugConfigRequest , inStream io.Reader , out io.Writer , interrupt <- chan os.Signal ) (* dbg .DebugResponse , error ) {
45
+ func Debug (ctx context.Context , req * rpc. GetDebugConfigRequest , inStream io.Reader , out io.Writer , interrupt <- chan os.Signal ) (* rpc .DebugResponse , error ) {
46
46
47
47
// Get debugging command line to run debugger
48
48
pme , release := commands .GetPackageManagerExplorer (req )
@@ -75,7 +75,7 @@ func Debug(ctx context.Context, req *dbg.DebugConfigRequest, inStream io.Reader,
75
75
// Get stdIn pipe from tool
76
76
in , err := cmd .StdinPipe ()
77
77
if err != nil {
78
- return & dbg .DebugResponse {Error : err .Error ()}, nil
78
+ return & rpc .DebugResponse {Error : err .Error ()}, nil
79
79
}
80
80
defer in .Close ()
81
81
@@ -85,7 +85,7 @@ func Debug(ctx context.Context, req *dbg.DebugConfigRequest, inStream io.Reader,
85
85
86
86
// Start the debug command
87
87
if err := cmd .Start (); err != nil {
88
- return & dbg .DebugResponse {Error : err .Error ()}, nil
88
+ return & rpc .DebugResponse {Error : err .Error ()}, nil
89
89
}
90
90
91
91
if interrupt != nil {
@@ -111,13 +111,13 @@ func Debug(ctx context.Context, req *dbg.DebugConfigRequest, inStream io.Reader,
111
111
112
112
// Wait for process to finish
113
113
if err := cmd .Wait (); err != nil {
114
- return & dbg .DebugResponse {Error : err .Error ()}, nil
114
+ return & rpc .DebugResponse {Error : err .Error ()}, nil
115
115
}
116
- return & dbg .DebugResponse {}, nil
116
+ return & rpc .DebugResponse {}, nil
117
117
}
118
118
119
119
// getCommandLine compose a debug command represented by a core recipe
120
- func getCommandLine (req * dbg. DebugConfigRequest , pme * packagemanager.Explorer ) ([]string , error ) {
120
+ func getCommandLine (req * rpc. GetDebugConfigRequest , pme * packagemanager.Explorer ) ([]string , error ) {
121
121
debugInfo , err := getDebugProperties (req , pme )
122
122
if err != nil {
123
123
return nil , err
0 commit comments