Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎commands/debug/debug_info.go‎

Lines changed: 13 additions & 13 deletions
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

‎internal/cli/debug/debug.go‎

Lines changed: 1 addition & 1 deletion
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

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

Lines changed: 39 additions & 40 deletions
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‎

Lines changed: 4 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /