Skip to content

Renamed gRPC field to match JSON output #2398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions commands/debug/debug_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
cortexDebugCustomJson["cortex-debug"] = convertToJsonMap(cortexDebugProps)
}
return &rpc.GetDebugConfigResponse{
Executable: debugProperties.Get("executable"),
Server: server,
ServerPath: debugProperties.Get("server." + server + ".path"),
ServerConfiguration: &serverConfiguration,
SvdFile: debugProperties.Get("svd_file"),
Toolchain: toolchain,
ToolchainPath: debugProperties.Get("toolchain.path"),
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),
ToolchainConfiguration: &toolchainConfiguration,
CustomConfigurationsJson: cortexDebugCustomJson,
Programmer: req.GetProgrammer(),
Executable: debugProperties.Get("executable"),
Server: server,
ServerPath: debugProperties.Get("server." + server + ".path"),
ServerConfiguration: &serverConfiguration,
SvdFile: debugProperties.Get("svd_file"),
Toolchain: toolchain,
ToolchainPath: debugProperties.Get("toolchain.path"),
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),
ToolchainConfiguration: &toolchainConfiguration,
CustomConfigs: cortexDebugCustomJson,
Programmer: req.GetProgrammer(),
}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func newDebugInfoResult(info *rpc.GetDebugConfigResponse) *debugInfoResult {
}
}
customConfigs := map[string]any{}
for id, configJson := range info.GetCustomConfigurationsJson() {
for id, configJson := range info.GetCustomConfigs() {
var config any
if err := json.Unmarshal([]byte(configJson), &config); err == nil {
customConfigs[id] = config
Expand Down
75 changes: 36 additions & 39 deletions rpc/cc/arduino/cli/commands/v1/debug.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rpc/cc/arduino/cli/commands/v1/debug.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ message GetDebugConfigResponse {
google.protobuf.Any server_configuration = 8;
// Custom debugger configurations (not handled directly by Arduino CLI but
// provided for 3rd party plugins/debuggers)
map<string, string> custom_configurations_json = 9;
map<string, string> custom_configs = 9;
// the SVD file to use
string svd_file = 10;
// The programmer specified in the request
Expand Down