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: Enforce programmer selection #2394

Merged
merged 3 commits into from
Oct 31, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 30, 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?

Enforce programmer selection to debug.

What is the current behavior?

The debug command allows running without specifying the -P flag.

What is the new behavior?

$ arduino-cli debug -b arduino:samd:mkr1000 
Error during Debug: Missing programmer
$ arduino-cli debug -b arduino:samd:mkr1000 --info
Error getting Debug info: Missing programmer
$ arduino-cli debug -b arduino:samd:mkr1000 --info --format json
{
  "error": "Error getting Debug info: Missing programmer"
}
$ 

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

Other information

@cmaglie cmaglie self-assigned this Oct 30, 2023
@cmaglie cmaglie added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 30, 2023
@cmaglie cmaglie added this to the Arduino CLI v0.35.0 milestone Oct 30, 2023
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ef72bde) 64.48% compared to head (ad261d6) 64.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2394      +/-   ##
==========================================
+ Coverage   64.48%   64.51%   +0.03%     
==========================================
  Files         207      207              
  Lines       19592    19594       +2     
==========================================
+ Hits        12633    12641       +8     
+ Misses       5867     5863       -4     
+ Partials     1092     1090       -2     
Flag Coverage Δ
unit 64.51% <100.00%> (+0.03%) ⬆️

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

Files Coverage Δ
commands/debug/debug_info.go 69.23% <100.00%> (+2.16%) ⬆️

... and 1 file with indirect coverage changes

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

@cmaglie cmaglie merged commit 0c0573f into arduino:master Oct 31, 2023
95 checks passed
@cmaglie cmaglie deleted the debug_force_programmer branch October 31, 2023 11:32
@cmaglie
Copy link
Member Author

cmaglie commented Oct 31, 2023

@kittaakos I'm cherry-picking this one in the 0.35.x branch

cmaglie added a commit that referenced this pull request Oct 31, 2023
* debug: Enforce programmer selection

* Fixed unit tests

* Increase code coverage
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 type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants