Skip to content

Commit cc3396f

Browse files
authored
[skip-changelog] Renamed gRPC field to match JSON output (#2398)
* Renamed gRPC field to match JSON output * Better comment for custom_configs field * Renamed variable
1 parent d187683 commit cc3396f

File tree

4 files changed

+57
-56
lines changed

4 files changed

+57
-56
lines changed

Diff for: commands/debug/debug_info.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,22 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
184184
}
185185
}
186186

187-
cortexDebugCustomJson := map[string]string{}
187+
customConfigs := map[string]string{}
188188
if cortexDebugProps := debugProperties.SubTree("cortex-debug.custom"); cortexDebugProps.Size() > 0 {
189-
cortexDebugCustomJson["cortex-debug"] = convertToJsonMap(cortexDebugProps)
189+
customConfigs["cortex-debug"] = convertToJsonMap(cortexDebugProps)
190190
}
191191
return &rpc.GetDebugConfigResponse{
192-
Executable: debugProperties.Get("executable"),
193-
Server: server,
194-
ServerPath: debugProperties.Get("server." + server + ".path"),
195-
ServerConfiguration: &serverConfiguration,
196-
SvdFile: debugProperties.Get("svd_file"),
197-
Toolchain: toolchain,
198-
ToolchainPath: debugProperties.Get("toolchain.path"),
199-
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),
200-
ToolchainConfiguration: &toolchainConfiguration,
201-
CustomConfigurationsJson: cortexDebugCustomJson,
202-
Programmer: req.GetProgrammer(),
192+
Executable: debugProperties.Get("executable"),
193+
Server: server,
194+
ServerPath: debugProperties.Get("server." + server + ".path"),
195+
ServerConfiguration: &serverConfiguration,
196+
SvdFile: debugProperties.Get("svd_file"),
197+
Toolchain: toolchain,
198+
ToolchainPath: debugProperties.Get("toolchain.path"),
199+
ToolchainPrefix: debugProperties.Get("toolchain.prefix"),
200+
ToolchainConfiguration: &toolchainConfiguration,
201+
CustomConfigs: customConfigs,
202+
Programmer: req.GetProgrammer(),
203203
}, nil
204204
}
205205

Diff for: internal/cli/debug/debug.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func newDebugInfoResult(info *rpc.GetDebugConfigResponse) *debugInfoResult {
151151
}
152152
}
153153
customConfigs := map[string]any{}
154-
for id, configJson := range info.GetCustomConfigurationsJson() {
154+
for id, configJson := range info.GetCustomConfigs() {
155155
var config any
156156
if err := json.Unmarshal([]byte(configJson), &config); err == nil {
157157
customConfigs[id] = config

Diff for: rpc/cc/arduino/cli/commands/v1/debug.pb.go

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

Diff for: rpc/cc/arduino/cli/commands/v1/debug.proto

+4-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ message GetDebugConfigResponse {
9292
// Extra configuration parameters wrt GDB server
9393
google.protobuf.Any server_configuration = 8;
9494
// Custom debugger configurations (not handled directly by Arduino CLI but
95-
// provided for 3rd party plugins/debuggers)
96-
map<string, string> custom_configurations_json = 9;
95+
// provided for 3rd party plugins/debuggers). The map keys identifies which
96+
// 3rd party plugin/debugger is referred, the map string values contains a
97+
// JSON configuration for it.
98+
map<string, string> custom_configs = 9;
9799
// the SVD file to use
98100
string svd_file = 10;
99101
// The programmer specified in the request

0 commit comments

Comments
 (0)