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

[breaking] gRPC Compile and BoardDetails now returns expanded build properties by default #2184

Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented May 24, 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?

  1. allows gRPC Compile and BoardDetails to return expanded build properties. It was previously possible only from command line.
  2. the default --show-properties option changed from unexpanded to expanded, so the expanded output is now the default. This is a breaking change.

What is the current behavior?

$ arduino-cli board details -b arduino:avr:uno --show-properties | grep ^tools.avrdude.path
tools.avrdude.path={runtime.tools.avrdude.path}

What is the new behavior?

$ arduino-cli board details -b arduino:avr:uno --show-properties | grep ^tools.avrdude.path
tools.avrdude.path=/home/megabug/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17
$ arduino-cli board details -b arduino:avr:uno --show-properties=unexpanded | grep ^tools.avrdude.path
tools.avrdude.path={runtime.tools.avrdude.path}

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

Yes, the default --show-properties option changed from unexpanded to expanded, so the expanded output is now the default.

Other information

@cmaglie cmaglie self-assigned this May 24, 2023
@cmaglie cmaglie added type: enhancement Proposed improvement topic: gRPC Related to the gRPC interface labels May 24, 2023
@cmaglie cmaglie added this to the Arduino CLI 0.33.0 milestone May 24, 2023
@cmaglie cmaglie force-pushed the allow_selection_of_board_property_expansion branch from 6554b69 to c24eef7 Compare May 24, 2023 11:43
@cmaglie cmaglie force-pushed the allow_selection_of_board_property_expansion branch from c24eef7 to 0f3cd7e Compare May 24, 2023 13:11
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Patch coverage: 60.86% and project coverage change: -0.07 ⚠️

Comparison is base (fbf3255) 62.69% compared to head (0f3cd7e) 62.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2184      +/-   ##
==========================================
- Coverage   62.69%   62.62%   -0.07%     
==========================================
  Files         223      223              
  Lines       19501    19502       +1     
==========================================
- Hits        12226    12214      -12     
- Misses       6192     6202      +10     
- Partials     1083     1086       +3     
Flag Coverage Δ
unit 62.62% <60.86%> (-0.07%) ⬇️

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.23% <0.00%> (+0.17%) ⬆️
arduino/utils/url.go 72.72% <72.72%> (ø)
commands/compile/compile.go 69.86% <100.00%> (+0.30%) ⬆️
internal/cli/arguments/show_properties.go 87.50% <100.00%> (ø)
internal/cli/compile/compile.go 66.77% <100.00%> (-0.51%) ⬇️

... and 1 file with indirect coverage changes

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

@kittaakos
Copy link
Contributor

I quickly checked and confirmed that the tools' paths are expanded, but I do not understand the complete diff. See below.

Before d9d740d.
After 0f3cd7e.

boardDetails_d9d740d.json.txt
boardDetails_0f3cd7e.json.txt
boardDetails.diff.txt

@cmaglie
Copy link
Member Author

cmaglie commented May 25, 2023

esp32 uses quite a lot of template placeholders tricks, so the textual diff is very big, but overall it looks good to me:
image

@kittaakos
Copy link
Contributor

Thanks for looking into the diff. I also find it OKish, I could not understand such parts:

From:

boardDetails.diff.txt

627,629d626
<         "build.flash_size=4MB",
<         "build.code_debug=0",
<         "upload.speed=921600",
632,633d628
<         "build.f_cpu=240000000L",
<         "build.flash_freq=80m",
634a630,631
>         "upload.speed=921600",
>         "build.code_debug=0",
637a635,637
>         "build.flash_size=4MB",
>         "build.f_cpu=240000000L",
>         "build.flash_freq=80m",
643,645d642

I have noticed order changes, and I remember it should not happen. I might have incorrectly understood the diff. Sorry.

@per1234 per1234 added the topic: code Related to content of the project itself label May 26, 2023
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

Thank you! I could access the expanded properties with the build from this PR.

I have noticed something regarding the property order (see #2184 (comment)), but all works fine.

Thank you for the help!

@cmaglie cmaglie merged commit ca79383 into arduino:master May 26, 2023
@cmaglie cmaglie deleted the allow_selection_of_board_property_expansion branch May 26, 2023 12:14
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.

4 participants