Skip to content

Added programmer.default directive to set a default programmer for a board. #2416

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 5 commits into from
Nov 13, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Nov 13, 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 the programmer.default directive to the boards.txt to allow developers to set a default programmer for specific boards. This may turn out useful for boards having an on-board programmer/debugger.

What is the current behavior?

All commands requiring a programmer will fail if no programmer is specified.

What is the new behavior?

The same command may not fail if a default programmer is specified in the board's platform.

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

Other information

@cmaglie cmaglie self-assigned this Nov 13, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: gRPC Related to the gRPC interface labels Nov 13, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

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

Comparison is base (17f0189) 67.15% compared to head (1912a43) 67.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2416      +/-   ##
==========================================
+ Coverage   67.15%   67.17%   +0.02%     
==========================================
  Files         210      210              
  Lines       20523    20543      +20     
==========================================
+ Hits        13782    13800      +18     
- Misses       5602     5603       +1     
- Partials     1139     1140       +1     
Flag Coverage Δ
unit 67.17% <66.66%> (+0.02%) ⬆️

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

Files Coverage Δ
arduino/cores/board.go 95.48% <100.00%> (+0.06%) ⬆️
commands/board/details.go 91.96% <100.00%> (+2.77%) ⬆️
internal/cli/compile/compile.go 73.41% <100.00%> (ø)
internal/cli/debug/debug.go 76.29% <100.00%> (ø)
internal/cli/feedback/result/rpc.go 89.08% <100.00%> (+0.01%) ⬆️
internal/cli/upload/upload.go 57.14% <100.00%> (ø)
internal/cli/burnbootloader/burnbootloader.go 45.23% <0.00%> (ø)
internal/cli/board/details.go 70.34% <57.14%> (-0.79%) ⬇️
internal/cli/arguments/programmer.go 70.00% <60.00%> (-30.00%) ⬇️

... and 1 file with indirect coverage changes

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

Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. I would only add a simple test, to avoid breaking in the future

@cmaglie cmaglie merged commit 3d88eff into arduino:master Nov 13, 2023
@cmaglie cmaglie deleted the default-programmer branch November 13, 2023 15:34
cmaglie added a commit that referenced this pull request Nov 13, 2023
…a board. (#2416)

* Updated gRPC API

* Implemented default programmer for boards

* Added default programmer in board details CLI command

* Implemented default programmer functionality in CLI

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

Successfully merging this pull request may close these issues.

3 participants