Skip to content
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

debug: Slightly refactored custom_configs section of GetDebugConfigResponse #2396

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 31, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

This PR changes the JSON produced by debug --info --format json command, making it more clear the section about custom configurations.
Previously the cortex-debug configuration was under the "cortex-debug_custom_configuration" field, now there is a section "custom_configs" with a "cortex-debug" subfield.
This change also allows for a future expansion of the number of plugins supported.

What is the current behavior?

$ arduino-cli debug -b arduino:samd:mkr1000 --info --format json -P edbg
{
  "executable": "/tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf",
  "toolchain": "gcc",
  "toolchain_path": "/home/megabug/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/",
  "toolchain_prefix": "arm-none-eabi-",
  "server": "openocd",
  "server_path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
  "server_configuration": {
    "path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
    "scripts_dir": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/share/openocd/scripts/",
    "scripts": [
      "/home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/variants/mkr1000/openocd_scripts/arduino_zero.cfg"
    ]
  },
  "cortex-debug_custom_configuration": {
    <--- Corted-debug configuration was here
  },
  "programmer": "edbg"
}

What is the new behavior?

$ arduino-cli debug -b arduino:samd:mkr1000 --info --format json -P edbg
{
  "executable": "/tmp/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf",
  "toolchain": "gcc",
  "toolchain_path": "/home/megabug/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/",
  "toolchain_prefix": "arm-none-eabi-",
  "server": "openocd",
  "server_path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
  "server_configuration": {
    "path": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd",
    "scripts_dir": "/home/megabug/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/share/openocd/scripts/",
    "scripts": [
      "/home/megabug/.arduino15/packages/arduino/hardware/samd/1.8.13/variants/mkr1000/openocd_scripts/arduino_zero.cfg"
    ]
  },
  "custom_configs": {
    "cortex-debug": {
      <--- Corted-debug configuration now is here
    }
  },
  "programmer": "edbg"
}

Does this PR introduce a breaking change, and is titled accordingly?

Other information

@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface labels Oct 31, 2023
@cmaglie cmaglie added this to the Arduino CLI v0.35.0 milestone Oct 31, 2023
@cmaglie cmaglie self-assigned this Oct 31, 2023
@cmaglie cmaglie changed the title debug: Slighlty refactored custom_configs section of GetDebugConfigResponse debug: Slightly refactored custom_configs section of GetDebugConfigResponse Oct 31, 2023
@umbynos umbynos linked an issue Oct 31, 2023 that may be closed by this pull request
@umbynos umbynos removed this from the Arduino CLI v0.35.0 milestone Oct 31, 2023
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (64f1853) 64.56% compared to head (cbbb15a) 64.58%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2396      +/-   ##
==========================================
+ Coverage   64.56%   64.58%   +0.01%     
==========================================
  Files         207      207              
  Lines       19632    19634       +2     
==========================================
+ Hits        12676    12681       +5     
+ Misses       5865     5863       -2     
+ Partials     1091     1090       -1     
Flag Coverage Δ
unit 64.58% <85.71%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
commands/debug/debug_info.go 73.42% <100.00%> (ø)
internal/cli/debug/debug.go 76.29% <77.27%> (+2.61%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cmaglie cmaglie merged commit d187683 into arduino:master Oct 31, 2023
99 checks passed
@cmaglie cmaglie deleted the debug_info_field_renaming branch October 31, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: gRPC Related to the gRPC interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance debug -I not encoding information in property name
2 participants