`lib_deps` downloads submodule of GitHub repo instead of the repo the URL points to

Facing this really weird issue which doesn’t seem to be documented anywhere (or I don’t realize how to search for it):

If a platformio.ini file is configured with a lib_deps variable that points to a repo on GitHub with a submodule, it downloads the submodule instead of the main one. Can be observed with the popular libDaisy:

add

lib_deps = https://github.com/electro-smith/libDaisy

to platformio.ini and you will receive a copy of googletest in .pio/libdeps/electrosmith_daisy, which is a submodule within the libDaisy repo. This specific case has also been documented here but the answers focus on other things. The docs of lib_deps do not specify any kind of flag I could use to circumvent this issue. Any ideas of what’s going on here? This question is not about the Daisy ecosystem specifically, I know that it is currently unsupported by PIO. This is a general question on lib_deps and git submodules.

As discussed in PlatformIO downloads subfolder - #4 by maxgerhardt.

The only solution to this is to either manually clone the library in lib or fork the library and add a library.json to it. You might need the latter anyways to explain build settings (macros, compiler flags, include folders, …) of this this library to PlatformIO.

The idea behind including it in lib_deps was to get automatic updates. It is clear to me that it won’t run without the library.json, which I would have generated during build time and dumped into the repo folder. This way, platformio.ini would have taken care of it, no matter where the project is built from. But thank you for the response and the link.