Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suppress compile summary stats if--quiet flag is set oncompile.#2820

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cmaglie merged 10 commits intoarduino:masterfromcmaglie:suppress_compile_stats
Jan 24, 2025

Conversation

@cmaglie
Copy link
Member

@cmagliecmaglie commentedJan 21, 2025
edited
Loading

Please check if the PR fulfills these requirements

Seehow to contribute

  • The PR has no duplicates (please search among thePull 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?

  • It makes the compile output completely silent if the--quiet flag is specified and the compile has no errors.
  • It removes the recap table if the build is successful and no--verbose or--quiet flags have been provided.
  • Adds the-q shortcut to the--quiet flag
Command lineA successful build showsA build with errors shows
arduino-cli compileSketch sizeSketch size, used libraries
arduino-cli compile -vBuild commands, sketch size, used librariesBuild commands, sketch size, used libraries
arduino-cli compile -qnothingErrors only

What is the current behavior?

$ arduino-cli compile -b arduino:samd:nano_33_iotSketch uses 11544 bytes (4%) of program storage space. Maximum is 262144 bytes.Global variables use 3560 bytes (10%) of dynamic memory, leaving 29208 bytes for local variables. Maximum is 32768 bytes.Used platform Version Patharduino:samd  1.8.14  /home/cmaglie/.arduino15/packages/arduino/hardware/samd/1.8.14$ arduino-cli compile -b arduino:samd:nano_33_iot --quietSketch uses 11544 bytes (4%) of program storage space. Maximum is 262144 bytes.Global variables use 3560 bytes (10%) of dynamic memory, leaving 29208 bytes for local variables. Maximum is 32768 bytes.Used platform Version Patharduino:samd  1.8.14  /home/cmaglie/.arduino15/packages/arduino/hardware/samd/1.8.14$

What is the new behavior?

$ arduino-cli compile -b arduino:samd:nano_33_iotSketch uses 11544 bytes (4%) of program storage space. Maximum is 262144 bytes.Global variables use 3560 bytes (10%) of dynamic memory, leaving 29208 bytes for local variables. Maximum is 32768 bytes.$ arduino-cli compile -b arduino:samd:nano_33_iot -q$

Does this PR introduce a breaking change, and istitled accordingly?

Other information

Fix#2796
Fix#2510

@cmagliecmaglie self-assigned thisJan 21, 2025
@cmagliecmaglie added type: enhancementProposed improvement topic: codeRelated to content of the project itself labelsJan 21, 2025
@codecov
Copy link

codecovbot commentedJan 21, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is86.41975% with11 lines in your changes missing coverage. Please review.

Project coverage is 67.72%. Comparing base(e9092cc) to head(17ced8f).
Report is 3 commits behind head on master.

Files with missing linesPatch %Lines
...nal/arduino/builder/internal/preprocessor/ctags.go57.14%3 Missing⚠️
...rnal/arduino/builder/internal/detector/detector.go75.00%1 Missing and 1 partial⚠️
internal/arduino/builder/sketch.go0.00%0 Missing and 2 partials⚠️
internal/arduino/builder/archive_compiled_files.go50.00%0 Missing and 1 partial⚠️
internal/arduino/builder/linker.go0.00%0 Missing and 1 partial⚠️
internal/arduino/builder/recipe.go0.00%0 Missing and 1 partial⚠️
internal/arduino/builder/sizer.go94.11%1 Missing⚠️
Additional details and impacted files
@@            Coverage Diff             @@##           master    #2820      +/-   ##==========================================+ Coverage   67.69%   67.72%   +0.02%==========================================  Files         238      238                Lines       22388    22406      +18     ==========================================+ Hits        15156    15174      +18  Misses       6036     6036                Partials     1196     1196
FlagCoverage Δ
unit67.72% <86.41%> (+0.02%)⬆️

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

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

Copy link
Contributor

@alessio-peruginialessio-perugini left a comment

Choose a reason for hiding this comment

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

Do we have a dedicated integration test that assert this new behaviour?
If not I'm afraid that we should add one, especially in the case-q and-v is provided.

Because it has a better error message than the cobra-provided one:  Can't use the following flags together: --quiet, --verboseInstead of:  Error: if any flags in the group [quiet verbose] are set none of the others can be; [quiet verbose] were all set
@cmaglie
Copy link
MemberAuthor

Do we have a dedicated integration test that assert this new behaviour?
If not I'm afraid that we should add one, especially in the case -q and -v is provided.

I've added the tests and they helped me to finally spot where the infamous\n in stderr was coming from!
I've also spotted another stderr contamination in the ctags launcher. Overall, it's good that we have those tests in place now.

alessio-perugini reacted with hooray emoji

@alessio-perugini
Copy link
Contributor

Also tested on my machine (linux) works 🥳

@cmagliecmaglie merged commit92fae9c intoarduino:masterJan 24, 2025
98 checks passed
@cmagliecmaglie deleted the suppress_compile_stats branchJanuary 24, 2025 14:52
@seife
Copy link

Is there an option to get the old behaviour (quiet compilation, but library list at the end) back?
Without giving "-q", I don't get anything and with "-v" I get too much.

The only difference between "no argument" and "-q" is that "-q" also suppresses the

Sketch uses 1709602 bytes (86%) of program storage space. Maximum is 1966080 bytes.Global variables use 67980 bytes (20%) of dynamic memory, leaving 259700 bytes for local variables. Maximum is 327680 bytes.

message

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lucarin91lucarin91Awaiting requested review from lucarin91

@dido18dido18Awaiting requested review from dido18

@MatteoPologrutoMatteoPologrutoAwaiting requested review from MatteoPologruto

1 more reviewer

@alessio-peruginialessio-peruginialessio-perugini approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@cmagliecmaglie

Labels

topic: codeRelated to content of the project itselftype: enhancementProposed improvement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Option to disable "Used Library" and "Used Platform" output when compiling Flag for suppressing library list / platform after compilation

3 participants

@cmaglie@alessio-perugini@seife

[8]ページ先頭

©2009-2025 Movatter.jp