Skip to content

Implemented --show-properties in board details command #2151

New issue

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

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

Already on GitHub? # to your account

Merged
merged 12 commits into from
Apr 19, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Apr 17, 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?

Adds a --show-properties flag to board details to allow getting the build properties of a board without actually compiling a sketch. The build properties will be missing some sketch-related definitions

What is the current behavior?

What is the new behavior?

$ arduino-cli board details -b arduino:avr:leonardo --show-properties=expanded | grep build.usb
build.usb_manufacturer="Unknown"
build.usb_flags=-DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"'
build.usb_product="Arduino Leonardo"
$

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

Other information

This PR also completes the refactoring of the legacy build-properties generation.
Fix #1047

@cmaglie cmaglie self-assigned this Apr 17, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: CLI Related to the command line interface labels Apr 17, 2023
@cmaglie cmaglie added this to the Arduino CLI 1.0 milestone Apr 17, 2023
@cmaglie cmaglie force-pushed the show_properties_without_a_sketch branch from bd8709d to a82cb1e Compare April 17, 2023 20:16
@cmaglie cmaglie force-pushed the show_properties_without_a_sketch branch from a82cb1e to 5954a05 Compare April 18, 2023 08:05
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Patch coverage: 63.18% and project coverage change: -0.18 ⚠️

Comparison is base (bfb5f3f) 62.66% compared to head (5954a05) 62.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2151      +/-   ##
==========================================
- Coverage   62.66%   62.48%   -0.18%     
==========================================
  Files         227      224       -3     
  Lines       19545    19516      -29     
==========================================
- Hits        12247    12195      -52     
- Misses       6205     6226      +21     
- Partials     1093     1095       +2     
Flag Coverage Δ
unit 62.48% <63.18%> (-0.18%) ⬇️

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

Impacted Files Coverage Δ
commands/board/details.go 0.00% <0.00%> (ø)
internal/cli/board/details.go 12.05% <16.12%> (-1.28%) ⬇️
internal/cli/board/list.go 8.86% <27.27%> (-0.76%) ⬇️
commands/compile/compile.go 66.99% <67.41%> (-4.82%) ⬇️
arduino/builder/sketch.go 57.62% <80.00%> (+4.56%) ⬆️
internal/cli/arguments/show_properties.go 87.50% <87.50%> (ø)
internal/cli/compile/compile.go 66.87% <94.11%> (-0.49%) ⬇️
arduino/cores/packagemanager/package_manager.go 77.05% <100.00%> (+1.76%) ⬆️
internal/cli/board/attach.go 22.72% <100.00%> (+1.18%) ⬆️
legacy/builder/container_setup.go 83.33% <100.00%> (-8.78%) ⬇️
... and 2 more

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
topic: CLI Related to the command line interface type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: compile --show-properties without a sketch
2 participants