From e3d8551929c0a5569385959d2e49679614b6b4bc Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 30 May 2021 13:46:20 -0700 Subject: [PATCH] Use optimal bundled library names When multiple libraries contain files matching an #include directive in the program, the Arduino build system must pick one to use for compilation. Multiple factors are used in order to make an intelligent determination of which library is best. In order to enhance this determination, the closeness of match between the library.properties name value and the filename in the #include directive is being added as one of those factors. This new factor is referred to as "Library Name Priority". Unfortunately, this change can result in platform bundled libraries which had previously been correctly correctly chosen no longer being given priority over their equivalent standalone libraries, which may be incompatible or not optimized for the platform's boards. This priority inversion only occurs when all the following conditions are true: - There is a standalone library installed which provides a header filename collision. - The platform bundled library is architecture optimized (e.g., architectures=esp32). - The standalone library is architecture compatible (architectures=*). - The standalone library has equal "Folder Name Priority". - The standalone library has better "Library Name Priority" (e.g., name=SD vs name=SD(ESP32) for a library with primary header file SD.h. The fix is to simply give the platform bundled library a perfect "Library Name Priority". Some platform bundled libraries were given a modified name as a workaround to a bug in the Arduino IDE's Library Manager which caused Library Manager to always show the library as updatable under specific circumstances. That bug was fixed in Arduino IDE 1.8.6, ~3 years ago. --- wifiduck/esp8266/libraries/Ethernet/library.properties | 2 +- wifiduck/esp8266/libraries/SD/library.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wifiduck/esp8266/libraries/Ethernet/library.properties b/wifiduck/esp8266/libraries/Ethernet/library.properties index 00320f2..4a950e4 100644 --- a/wifiduck/esp8266/libraries/Ethernet/library.properties +++ b/wifiduck/esp8266/libraries/Ethernet/library.properties @@ -1,4 +1,4 @@ -name=Ethernet(esp8266) +name=Ethernet version=1.0.4 author=Arduino maintainer=Arduino diff --git a/wifiduck/esp8266/libraries/SD/library.properties b/wifiduck/esp8266/libraries/SD/library.properties index 5091024..72210df 100644 --- a/wifiduck/esp8266/libraries/SD/library.properties +++ b/wifiduck/esp8266/libraries/SD/library.properties @@ -1,4 +1,4 @@ -name=SD(esp8266) +name=SD version=2.0.0 author=Earle F. Philhower, III maintainer=Earle F. Philhower, III