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

bugfix:compile ... --dump-profile now produces a clean output#2852

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 3 commits intoarduino:masterfromcmaglie:fix_profile_dump
Feb 28, 2025

Conversation

@cmaglie
Copy link
Member

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?

When acompile --dump-profile is performed, the output is the clean profile that could be redirected in a file.

What is the current behavior?

A regression in the Arduino CLI 1.2.0 made the profile disappear from the non-verbose output:

$ arduino-cli compile -b arduino:avr:uno --dump-profileLo sketch usa 444 byte (1%) dello spazio disponibile per i programmi. Il massimo è 32256 byte.Le variabili globali usano 9 byte (0%) di memoria dinamica, lasciando altri 2039 byte liberi per le variabili locali. Il massimo è 2048 byte.

the only way to get the profile with --dump-profile is to enable verbose -v, but this is really inconvenient:

$ arduino-cli compile -b arduino:avr:uno --dump-profile -vFQBN: arduino:avr:unoUtilizzo della scheda 'uno' dalla piattaforma nella cartella: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Utilizzo del core 'arduino' dalla piattaforma nella cartella: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Rilevamento delle librerie utilizzate in corso.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /dev/nullSto generando i prototipi di funzione.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /tmp/709592250/sketch_merged.cpp/home/megabug/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/709592250/sketch_merged.cppCompilazione dello sketch in corso.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp.oCompilazione delle librerie in corso...Compilazione del core in corso...Utilizzo del core precompilato: /home/megabug/.cache/arduino/cores/arduino_avr_uno_12e4cfbdc0590d50ab9cd20e50a4c3c5/core.aCollegare tutto insieme.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp.o /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/../../cores/arduino_avr_uno_12e4cfbdc0590d50ab9cd20e50a4c3c5/core.a -L/home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3 -lm/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.eep/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elf /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.hex/home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/Blink.ino.elfLo sketch usa 444 byte (1%) dello spazio disponibile per i programmi. Il massimo è 32256 byte.Le variabili globali usano 9 byte (0%) di memoria dinamica, lasciando altri 2039 byte liberi per le variabili locali. Il massimo è 2048 byte.Piattaforma utilizzata Versione Percorsoarduino:avr            1.8.6    /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6profiles:  uno:    fqbn: arduino:avr:uno    platforms:      - platform: arduino:avr (1.8.6)

What is the new behavior?

$ arduino-cli compile -b arduino:avr:uno --dump-profileprofiles:  uno:    fqbn: arduino:avr:uno    platforms:      - platform: arduino:avr (1.8.6)$

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

Other information

Fix#2848

@cmagliecmaglie self-assigned thisFeb 27, 2025
@cmagliecmaglie added priority: mediumResolution is a medium priority type: imperfectionPerceived defect in any part of project topic: CLIRelated to the command line interface labelsFeb 27, 2025
@codecov
Copy link

codecovbot commentedFeb 27, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is62.71186% with22 lines in your changes missing coverage. Please review.

Project coverage is 67.87%. Comparing base(079a28f) to head(0c79a98).
Report is 1 commits behind head on master.

Files with missing linesPatch %Lines
internal/cli/compile/compile.go60.71%17 Missing and 5 partials⚠️
Additional details and impacted files
@@            Coverage Diff             @@##           master    #2852      +/-   ##==========================================+ Coverage   67.73%   67.87%   +0.13%==========================================  Files         238      238                Lines       22402    22412      +10     ==========================================+ Hits        15175    15212      +37+ Misses       6033     6005      -28- Partials     1194     1195       +1
FlagCoverage Δ
unit67.87% <62.71%> (+0.13%)⬆️

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.

@cmagliecmaglie requested a review froma teamFebruary 27, 2025 16:31
Copy link
Contributor

@lucarin91lucarin91 left a comment

Choose a reason for hiding this comment

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

LGTM

@manchoz
Copy link
Contributor

LTGM but--dump-profile parameter now takes over-verbose

 ./arduino-cli compile -b arduino:mbed_opta:opta --verbose --dump-profile TestProfile/profiles:  opta:    fqbn: arduino:mbed_opta:opta    platforms:      - platform: arduino:mbed_opta (4.2.2)    libraries:      - ArduinoIoTCloud (2.4.0)      - Arduino_ConnectionHandler (1.0.0)      - Arduino_DebugUtils (1.4.0)      - ArduinoMqttClient (0.1.8)      - Arduino_SecureElement (0.3.0)      - ArduinoECCX08 (1.3.8)      - ArduinoHttpClient (0.6.1)

It might be a good idea to have them ORed. WDYT?

@cmaglie
Copy link
MemberAuthor

It might be a good idea to have them ORed. WDYT?

Do you mean XORed?
Actually, the-v has an effect: in case of errors the verbose output is displayed instead of the normal output.

$ arduino-cli compile -v -b arduino:avr:uno --dump-profileFQBN: arduino:avr:unoUtilizzo della scheda 'uno' dalla piattaforma nella cartella: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Utilizzo del core 'arduino' dalla piattaforma nella cartella: /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Rilevamento delle librerie utilizzate in corso.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /dev/nullSto generando i prototipi di funzione.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /tmp/3218949563/sketch_merged.cpp/home/megabug/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/3218949563/sketch_merged.cppCompilazione dello sketch in corso.../home/megabug/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp -o /home/megabug/.cache/arduino/sketches/002050EAA7EFB9A4FC451CDFBC0FA2D3/sketch/Blink.ino.cpp.o/home/megabug/Arduino/Blink/Blink.ino:6:1: error: 'aaa' does not name a type aaa ^~~Piattaforma utilizzata Versione Percorsoarduino:avr            1.8.6    /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Si è verificato un errore durante la compilazione: exit status 1

vs

$ arduino-cli compile -b arduino:avr:uno --dump-profile/home/megabug/Arduino/Blink/Blink.ino:6:1: error: 'aaa' does not name a type aaa ^~~Piattaforma utilizzata Versione Percorsoarduino:avr            1.8.6    /home/megabug/.arduino15/packages/arduino/hardware/avr/1.8.6Si è verificato un errore durante la compilazione: exit status 1

@manchoz
Copy link
Contributor

With ORed, I mean showing both the verbose output and dumping the profile, but I don't know if it is a good idea. It may be better to separate the two features. I let you have the last word.

@cmaglie
Copy link
MemberAuthor

With ORed, I mean showing both the verbose output and dumping the profile, but I don't know if it is a good idea. It may be better to separate the two features. I let you have the last word.

Ah, no then, I'll keep it as in this PR.

@cmagliecmaglie merged commitb9edb78 intoarduino:masterFeb 28, 2025
98 checks passed
@cmagliecmaglie deleted the fix_profile_dump branchFebruary 28, 2025 10:03
@per1234per1234 added the topic: codeRelated to content of the project itself labelFeb 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lucarin91lucarin91lucarin91 approved these changes

Assignees

@cmagliecmaglie

Labels

priority: mediumResolution is a medium prioritytopic: CLIRelated to the command line interfacetopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Dumping profile should work in non verbose mode

4 participants

@cmaglie@manchoz@lucarin91@per1234

[8]ページ先頭

©2009-2025 Movatter.jp