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

Add possibility to embed custom libraries into the sketch #2514

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

Draft
cmaglie wants to merge 5 commits into arduino:master
base: master
Choose a base branch
Loading
from cmaglie:custrom_lib_sketch

Conversation

Copy link
Member

@cmaglie cmaglie commented Jan 25, 2024
edited
Loading

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?

Adds the possibility to include libraries in the sketch libraries folder

What is the current behavior?

~/Arduino/Blink$ tree
.
├── Blink.ino
└── libraries
  └── ExampleLibrary
  └── MyLib.h
3 directories, 2 files
~/Arduino/Blink$ cat Blink.ino 
#include <MyLib.h>
void setup() {
	libFunction();
}
void loop() {
}
~/Arduino/Blink$ cat libraries/ExampleLibrary/MyLib.h 
void libFunction() {
}
~/Arduino/Blink$ arduino-cli compile -b arduino:avr:uno 
/home/cmaglie/Arduino/Blink/Blink.ino:1:10: fatal error: MyLib.h: No such file or directory
 #include <MyLib.h>
 ^~~~~~~~~
compilation terminated.
Used platform Version Path
arduino:avr 1.8.6 /home/cmaglie/.arduino15/packages/arduino/hardware/avr/1.8.6
Error during build: exit status 1

What is the new behavior?

~/Arduino/Blink$ arduino-cli compile -b arduino:avr:uno 
Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
Used library Version Path
ExampleLibrary /home/cmaglie/Arduino/Blink/libraries/ExampleLibrary
Used platform Version Path
arduino:avr 1.8.6 /home/cmaglie/.arduino15/packages/arduino/hardware/avr/1.8.6

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

Other information

Resolves #1255

matthijskooijman and per1234 reacted with hooray emoji manchoz reacted with heart emoji
@cmaglie cmaglie self-assigned this Jan 25, 2024
@cmaglie cmaglie added type: enhancement Proposed improvement topic: code Related to content of the project itself topic: CLI Related to the command line interface labels Jan 25, 2024
Copy link

codecov bot commented Jan 25, 2024
edited
Loading

Codecov Report

❌ Patch coverage is 81.81818% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.56%. Comparing base (54209cf) to head (83a9b40).
⚠️ Report is 130 commits behind head on master.

Files with missing lines Patch % Lines
internal/arduino/sketch/sketch.go 71.42% 4 Missing and 2 partials ⚠️
internal/arduino/libraries/libraries_location.go 77.77% 2 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## master #2514 +/- ##
=======================================
 Coverage 67.55% 67.56% 
=======================================
 Files 237 237 
 Lines 22358 22398 +40 
=======================================
+ Hits 15105 15134 +29 
- Misses 6063 6071 +8 
- Partials 1190 1193 +3 
Flag Coverage Δ
unit 67.56% <81.81%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Xayton Xayton changed the title (削除) Add possibility to embed libraries into the sketch (削除ここまで) (追記) Add possibility to embed custom libraries into the sketch (追記ここまで) Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
topic: CLI Related to the command line interface topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support bundling libraries with a sketch
1 participant

AltStyle によって変換されたページ (->オリジナル) /