Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork445
Allow locally installed libraries in sketch profiles.#2930
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
634d074 tocdd7f4eComparecodecovbot commentedJun 10, 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 Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #2930 +/- ##==========================================+ Coverage 67.91% 67.96% +0.05%========================================== Files 238 238 Lines 22489 22524 +35 ==========================================+ Hits 15273 15309 +36+ Misses 6017 6013 -4- Partials 1199 1202 +3
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.
The implementation looks good, I'd just add a test to assert the compilation given asketch.yaml with also relative lib.
Uh oh!
There was an error while loading.Please reload this page.
1d46837 to0bd806eCompareegnor commentedJun 13, 2025
This is amazing! I will finally be able to get rid of my various hacky uses of |
alessio-perugini commentedJun 13, 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.
@egnor 😄 If you want to give it a try, before we merge this, you can find the test binaries here:https://github.com/arduino/arduino-cli/actions/runs/15586877233 Feedbacks are always welcomed 🤓 |
0bd806e to1589119Compare3dca438 intoarduino:masterUh oh!
There was an error while loading.Please reload this page.
mike-lloyd03 commentedAug 27, 2025
I cannot get this to work. I'm trying to share some code between two sketches. I have this sketch file: default_fqbn:esp32:esp32:esp32s3:CDCOnBoot=cdcprofiles:main:port:/dev/ttyACM1platforms: -platform:esp32:esp32 (3.2.0)libraries: -Adafruit BusIO (1.17.2) -Adafruit GFX Library (1.12.1) -Adafruit ST7735 and ST7789 Library (1.11.0) -ESP32Encoder (0.11.7) -NimBLE-Arduino (2.3.2) -OneButton (2.6.1) -dir:../common With this file structure: Inside #include"fs.h" Compiler throws an error: When I run with the |
egnor commentedAug 28, 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.
It should probably be generating an error, but I suspect your problem is that the library directory can't just include files, it has to be a proper library inthe newer format with a |
mike-lloyd03 commentedAug 28, 2025
I actually tried exactly that. Code in the I also passed a non-existent directory in the |
egnor commentedAug 28, 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.
Ok, file a bug and we can debug there instead of commenting on the PR? Ideally include a zip file (or github pointer) for a directory layout that reproduces the issue? |
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 change allows us to specify libraries in the sketch profile using a path to a local directory by prefixing the path with the string
dir:.It also provides this information in
compile --dump-profileWhat is the current behavior?
Only libraries in the Arduino Libraries Index could be specified in a sketch profile. A typical example may be the following:
What is the new behavior?
A library installed in the filesystem could be specified as well:
In this case the two libraries:
libraries/MyLib/path/to/library/MyLibOutsideTheSketchwill be included during the compilation. In particular, a relative path refers to a path relative to the sketch path, in this case
libraries/MyLibis to be intended asSKETCHPATH/libaries/MyLib.Does this PR introduce a breaking change, and istitled accordingly?
No
Other information