Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork445
Auto-import libraries based on sketch profile.#2951
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
Auto-import libraries based on sketch profile.#2951
Conversation
This change is preparatory for next refactorings
This equivalent change moves the 'first' variable closer to his definition and use.
it will be useful in the next commits.
…profile.This will improve sketch compile time.
This avoid cache invalidation if recompiled.
codecovbot commentedJul 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #2951 +/- ##==========================================- Coverage 68.01% 67.99% -0.03%========================================== Files 238 239 +1 Lines 22567 22589 +22 ==========================================+ Hits 15350 15360 +10- Misses 6015 6025 +10- Partials 1202 1204 +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:
|
alessio-perugini left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
ae68728 intoarduino:masterUh oh!
There was an error while loading.Please reload this page.
Please check if the PR fulfills these requirements
Seehow 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?
This PR changes the way libraries are imported when using sketch profiles.
What is the current behavior?
The libraries specified on profiles are "loaded" in the global state. Still, they are imported and compiled only if referenced by the sketch (or indirectly by a library imported from the sketch) after the so-called "library discovery".
What is the new behavior?
The libraries specified on profiles are always imported and compiled, even if not referenced directly or indirectly by the sketch.
This reduces the number of "library discovery" passes and slightly improves compilation times. Still, the main part of the library discovery phase remains.
Does this PR introduce a breaking change, and istitled accordingly?
It might introduce a breaking change. For example, if a library is listed in a sketch profile but not used in the sketch, after this update, the library will still be compiled, leading to a compilation failure.
Other information