Closed Phintly closed 3 years ago
It's been done in both
lib_deps =
; PlatformIO 4.x
Functional-Vlpp@~1.0.1
Ethernet@~2.0.0
EthernetLarge@~2.0.0
Ethernet2@~1.0.4
Ethernet3@~1.5.3
EthernetENC@~2.0.0
UIPEthernet@~2.0.9
; PlatformIO 5.x
; khoih-prog/Functional-Vlpp@~1.0.1
; PaulStoffregen/Ethernet@~2.0.0
; PaulStoffregen/EthernetLarge@~2.0.0
; adafruit/Ethernet2@~1.0.4
; sstaub/Ethernet3@~1.5.3
; jandrassy/EthernetENC@~2.0.0
; UIPEthernet/UIPEthernet@~2.0.9
and
depends=Functional-Vlpp
It's working with other libraries. If it doesn't work for you, either check your PIO installation or post a question on PIO Forum
Manually copying the library's dependencies into your own dependencies contradicts the purpose of a dependency management system and library.properties is the configuration for the standard library manager, not for PlatformIO (EDIT: In this case, it can however use library.properties if there is no library.json). See: https://docs.platformio.org/en/latest/librarymanager/config.html#dependencies
PIO is new and is changing quickly. The library original design is for Arduino IDE which relies only on library.properties
.
Many libraries' dependency installations, so far, are working OK with PIO, but some not. Ask PIO why.
But anyway I'll add the library.json
dependencies, from now on, into all new libraries to support this PIO feature. Hopefully will be OK for another while.
Thanks,
Already updated on master of this lib. Certainly will add to every libraries I'm currently maintaining.
The way PIO is doing is very clumsy.
It'll take a lot of time to search and know the correct "owner" and "name" of each dependent library. Many times, the library's name is different from the one used in Arduino IDE.
For example:
STM32duino STM32Ethernet Library
name=STM32duino STM32Ethernet
...
depends=STM32duino LwIP
{
"owner": "stm32duino",
"name": "STM32Ethernet", <============ Drop STM32duino
"version": "^1.2.0"
}
and you can only know that when you search, then access access the Library in PIO and see
pio lib install "stm32duino/STM32Ethernet"
That's why many libraries writers don't care about library.json
and PIO. Just only library.properties
, even nothing (no library.json
and library.properties
).
You have to try to add libraries' dependencies once and understand the issue.
Then for
name=STM32duino LwIP
{
"owner": "stm32duino",
"name": "STM32duino LwIP", <=========== now using original IDE name
}
and you can only know that when you search, then access access the Library in PIO STM32duino LwIP
and see
pio lib install "stm32duino/STM32duino LwIP"
Oh god, you are still working on it. I didn't mean to waste your time like that. Maybe try just removing the library.json
altogether in the libraries you haven't yet supplemented by the dependencies since, like I said, PIO should also work with the library.properties
afaik.
The only requirement is a library manifest file - library.json, library.properties, or module.json.
https://docs.platformio.org/en/latest/librarymanager/creating.html
Or you could just wait until someone complains.
Thanks for your words.
Just try my best to save you all a lot of time later.
In the lengthy and time-consuming process to modify all 50+ libs. Hopefully once and for all. ;-((
Why is the functional library not listed in library.json under dependencies so that PlatformIO can install it automatically?