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

fix: Sketch preprocessing errors were displayed on stdout instead of stderr #2806

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Jan 9, 2025

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?

Fix the error output during sketch preprocessing wrongly redirected to stdout instead of stderr.

What is the current behavior?

$ arduino-cli compile -b arduino:avr:uno 
/home/megabug/Arduino/Blink/Blink.ino:1:2: error: #error eeee
 #error eeee
  ^~~~~
$ arduino-cli compile -b arduino:avr:uno 1> /dev/null 
Error during build: exit status 1

What is the new behavior?

$ arduino-cli compile -b arduino:avr:uno 
/home/megabug/Arduino/Blink/Blink.ino:1:2: error: #error eeee
 #error eeee
  ^~~~~
$ arduino-cli compile -b arduino:avr:uno 1> /dev/null 
/home/megabug/Arduino/Blink/Blink.ino:1:2: error: #error eeee
 #error eeee
  ^~~~~
Error during build: exit status 1

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

Other information

@cmaglie cmaglie self-assigned this Jan 9, 2025
@cmaglie cmaglie added type: imperfection Perceived defect in any part of project topic: build-process Related to the sketch build process labels Jan 9, 2025
@cmaglie cmaglie changed the title fix: Sketch preprocessing errors were output on stdout instead of stderr fix: Sketch preprocessing errors were displayed on stdout instead of stderr Jan 9, 2025
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.61%. Comparing base (d1b47cf) to head (5810d62).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2806      +/-   ##
==========================================
- Coverage   67.63%   67.61%   -0.02%     
==========================================
  Files         238      238              
  Lines       22392    22392              
==========================================
- Hits        15144    15141       -3     
- Misses       6060     6062       +2     
- Partials     1188     1189       +1     
Flag Coverage Δ
unit 67.61% <100.00%> (-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-perugini alessio-perugini left a comment

Choose a reason for hiding this comment

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

LGTM, tested also locally on my machine

@cmaglie cmaglie merged commit 24799f3 into arduino:master Jan 9, 2025
98 checks passed
@cmaglie cmaglie deleted the compiler-stderr branch January 9, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: build-process Related to the sketch build process type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants