-
-
Notifications
You must be signed in to change notification settings - Fork 398
[Proposal] Declare library depencies inside sketches #1011
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
Comments
Sorry to bump this thread, but really no one is interested by this? It's such a common problem to install the correct library for newbies... I see a lot of potential in my proposal but maybe I missed something :-) |
Hi @philippejadin , |
Good to know for the link. I will make a proof of concept and will report back here if I manage to have something interesting. |
Looks related to arduino/Arduino#5795 |
@philippejadin Have you been able to make progress on this? This of course requires that all library versions remain available indefinitely... |
Unfortunately all I have done is make a proposal. This must be decided by the core team and implemented by very competent people (which does not include me in both cases :-) ) |
This being said, I still think that my proposal holds well and is simple enough for users / code writers. |
@facchinm Do you know if there is something on the roadmap for this problem? Your suggestion to use a url link to the librarymanager could already help, but it is very limited.
This latest point could be implemented without requiring a change of the Arduino infrastructure. |
The easiest workaround I know of is to convert your sketch into one of the "examples" for a library. Then you can put the dependencies in
The library itself can be basically empty, e.g. do-something.cpp from the dummy |
@philippejadin Maybe #1321 can be helpful for you? |
Actually this has been implemented in the cli https://arduino.github.io/arduino-cli/latest/sketch-project-file/. |
This proposal is short and addresses a shortcoming for every user : which library do I need to install to make this sketch run?
Markup proposal, example with the rfid lib :
Note that we simply use a comment so nothing changes from the compiler point of view.
Markup proposal specifying the lib version to use :
The rules are as follow :
require_arduino_lib
The text was updated successfully, but these errors were encountered: