If I download a sketch/project from somewhere on the web and want to build the sketch, I first need to manually check the dependencies. I have to check the "includes" and maybe also the documentation. Then I need to search for the right library in the library manager and finally install it. THEN I can try to build it. And if I found the correct library with the correct version it will hopefully compile successfully.
What about having a kind of "dependency-config" for a sketch or a kind of meta-information IN the sketch that lets the Arduino IDE detect which version the build would require and finally download the correct version.
But then of course different sketches might use different version of same library. So arduino IDE would need to use a dedicated lib-folder for each sketch/project.
This would for sure improve the situation where you want to rebuild a certain project that you actually do not own, f.i. projects you found on Github etc ...
Of course this would add another level of complexity to a sketch. But it should be possible to have this kind of backward compatible: if dependency-information is available, use it. If it's not available, proceed as before: let the user find the dependencies on his own.
Have there been any thoughts about this kind of sketch-to-lib-dependency-management? If so: What's the progress?
kind regards,
Alex
/*
* @LibraryDependency(name="FooLib", version="1.0.0")
* @LibraryDependency(name="BarLib", version="1.2.3")
*/
dependency_1=FooLib@1.0.0
dependency_2=BarLib@1.2.3
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@arduino.cc.
This is perhaps scope creep but it would be helpful if the Arduino IDE supported links to the library manager.
How does the dependency manager square the code asking for 1.0.2 and the GitHub or Library Manager version being higher?
I think this issue and PR is relevant to this discussion:
https://github.com/arduino/Arduino/issues/1481
https://github.com/arduino/Arduino/pull/7349
since it is proposing adding metadata to the sketch which
https://github.com/arduino/Arduino/pull/6004 is a bit different since it's about library dependencies rather than sketch dependencies and libraries already have an existing metadata file (library.properties).
This is perhaps scope creep but it would be helpful if the Arduino IDE supported links to the library manager.
It does already:
https://github.com/arduino/Arduino/commit/d1516f60b8d65662f533d69bf8e0493a6853a341
#include "SparkFun_UHF_RFID_Reader.h" // http://librarymanager/All#SparkFun_Simultaneous_RFID_Tag_Reader_Library
One of several useful features of the Arduino IDE that are largely unused because the developers didn't bother to properly document them. I think we really need an Arduino Sketch Specification page added to the arduino/Arduino GitHub wiki for this sort of information, especially if sketch metadata is added.
How does the dependency manager square the code asking for 1.0.2 and the GitHub or Library Manager version being higher?
I think it will only be practical to handle sketch dependencies for libraries that are in the Library Manager index. That index contains all releases of the library that meet the Library Manager requirements. So I don't think there's any issue with specifying the dependency version.