Skip GCC pre-process task if sketch and dependencies do not change.#3112
Merged
Conversation
9e0a18c to
0a0a741
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3112 +/- ##
==========================================
+ Coverage 69.57% 69.60% +0.02%
==========================================
Files 253 253
Lines 19280 19284 +4
==========================================
+ Hits 13414 13422 +8
+ Misses 4628 4626 -2
+ Partials 1238 1236 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dca1c06 to
32b1aac
Compare
5d53241 to
f2230ee
Compare
This changes does some cleanup in the generation and use of the merged sketch (sketch.ino.cpp.merged) and Arduino Preprocessed sketch (sketch.ino.cpp).
6 tasks
lucarin91
reviewed
Mar 9, 2026
lucarin91
left a comment
Contributor
There was a problem hiding this comment.
I would avoid using paths if you really just need a filename. In the comments below, I suggest some updates to clarify that
cmaglie
requested changes
Mar 9, 2026
Co-authored-by: Cristian Maglie <c.maglie@bug.st>
Co-authored-by: Luca Rinaldi <to@lucar.in>
Co-authored-by: Luca Rinaldi <to@lucar.in>
Co-authored-by: Luca Rinaldi <to@lucar.in>
Co-authored-by: Luca Rinaldi <to@lucar.in>
Co-authored-by: Luca Rinaldi <to@lucar.in>
Co-authored-by: Cristian Maglie <c.maglie@bug.st>
Co-authored-by: Cristian Maglie <c.maglie@bug.st>
cmaglie
approved these changes
Mar 9, 2026
dido18
approved these changes
Mar 9, 2026
dido18
left a comment
Contributor
There was a problem hiding this comment.
LGTM, I did not test on real board
lucarin91
approved these changes
Mar 9, 2026
This was referenced Mar 18, 2026
6 tasks
cmaglie
added a commit
that referenced
this pull request
Apr 10, 2026
…the target file is missing (#3149) This is a regression introduced in #3112, but not yet released. * Move sketch-unchanged check down one level * fix: Arduino Preprocessor must always run if the target file is missing * Slight refactor for readability * Added integration test * Refactoring and modernization of the if condition
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.mdhas been updated with a migration guide (for breaking changes)configuration.schema.jsonupdated if new parameters are added.What kind of change does this PR introduce?
In an effort to optimize compilation times, this PR adds the ability to the Arduino CLI to detect whether the Arduino Preprocessing of the sketch could be skipped.
What is the current behavior?
The GCC task is run even if the Task did not changed
What is the new behavior?
The GCC task args are hashed and is stored in order to be able to compare it with prev/next recompile GCC task
Does this PR introduce a breaking change, and is titled accordingly?
Other information