Go Down

Topic: library dependency manager coming to arduino IDE (Read 679 times) previous topic - next topic

adafruit



some exciting news for arduino library writers and maintainers - there has been some activity over at the arduino ide github repo to add the beginnings of a library dependency manager!

check out the merged PR here:
   https://github.com/arduino/Arduino/pull/8600

this is what the new IDE will look like... attached.

try downloading the preliminary builds to test out this awesome new capability, they're auto built and ready to try!
   https://github.com/arduino/Arduino/pull/8600#issuecomment-511711024

we'll be adding this capability to our hundreds of libraries soon!




pert

For anyone wanting to define dependencies of their libraries, the field name mentioned in the pull request description is incorrect. The library.properties field is called depends, not requires.

I think it's still not implemented in the Arduino IDE, but plans are to also allow you to specify dependencies versions, as explained by the author of the feature:
https://github.com/adafruit/DHT-sensor-library/pull/118#issuecomment-510990649
Quote
there is the possibility to add a version constraint in this way:
Code: [Select]
depends=First Library (=2.0.0), Second Library (>=1.2.0), Third (^1.2.3)

BTW these constraints are implemented on the indexer (so they are reported on the library_index.json) but not yet in the IDE (it will always install the latest version). The constraints supported are the classic > >= = etc. and the special ^ (that means "compatible with").
Here you can see the feature in use in the Arduino_OAuth library:
https://github.com/arduino-libraries/Arduino_OAuth/blob/master/library.properties#L11
This results in a dialog similar to that shown in adafruit's screenshot above when you install the Arduino_OAuth library via Library Manager.

Go Up