bengtmartensson / AGirs

A Girs infrared server for the Arduino
http://www.harctoolbox.org/Girs.html
GNU General Public License v2.0
55 stars 13 forks source link

Specify library dependencies in library.properties #51

Closed per1234 closed 4 years ago

per1234 commented 4 years ago

Specifying the library dependencies in the depends field of library.properties causes the Arduino Library Manager (Arduino IDE 1.8.10 and newer) to offer to install any missing dependencies during installation of this library.

Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format

bengtmartensson commented 4 years ago

Thank you very much for this PR and for your interest. Unfortunately, the dependencies you list are not quite correct: Ethernet and Beacon are required only in certain configurations. According to the page you linked, dependencies are "libraries that are needed to build the current library".

I will therefore formally reject the PR, but will add Infrared and LiquidCrystal_I2C in another commit.

Thank you again.

per1234 commented 4 years ago

Fair enough. My philosophy is that it's better to waste a few seconds and a few kilobytes installing a library that's not needed than to not install a library that is needed and cause a beginner to have a bad experience trying to figure out how to fix a confusing "no such file or directory" error. But the choice is yours of course.

bengtmartensson commented 4 years ago

Thank you for the comments.

Suggestion: add your "philosophy" to said page as "best practice". I (and probably many others) think of "dependency" in the classical sense.

Strictly speaking, it is the examples that (possibly) have the dependency of Ethernet/Beacon. BTW, Most ("most") usages of this library will not need them, see for example http://www.harctoolbox.org/arduino_nano.html