I have a strange issue with one of my libraries (GitHub - jgromes/RadioLib: Universal wireless communication library for embedded devices). The library contains a library.json file, which specifies that LDF mode chain+ should be used - there’s a lot of #ifdefs which control compilation for different platforms, so chain+ is needed to resolve dependecies.
The strange thing is, when the library is included in a PlatformIO project using lib_deps in platformio.ini, it seems that chain+ LDF mode is not used for the library anymore, as LDF tries to compile a library that is guarded by an #ifdef.
Is there a way to specify LDF mode to be used on the library, or am I misunderstanding something?
Any of the examples in that library. When compiling anything for STM32, the LDF tries to load SubGhz.h because it finds it in one of the files (src/modules/SX126x/STM32WLx_Module.cpp), but it ignores that it’s guarded by a macro.
No, I previously only published libraries to the Arduino IDE Library Manager, which fetches the update based on existing tag and the value in library.properties. Platformio shows the version does exist though, so I assumed there was some automated process here as well.
Thank you very much! I think that did help, my test project builds now. I can also see on the registry page that it does show the information from library.json which were missing previously (keywords etc.).
I will try to verify this with the person who originally reported the issue, but it seems fixed.
What was the root cause? Was it the presence of both library.properties and library.json, or something I did wrong in one of those files? I’d like to avoid this situation in the future.
We just switched the library to the library.json manifest. It could be an issue that you tried to update the “version” field in the manifest BEFORE making the final release/tag.
We recommend incrementing the “version” field only when you are ready to push the new release/tag.
I update the library by changing the version number in library.properties (and now in library.json as well), and then tagging this commit as the release. So I guess that should be OK, right?
One potential issue is that the CI on the library takes quite long for releases (because some platforms take forever to build all the examples), 2 hours or more. So effectively, there’s a 2-hour window between the change in library.json and a new tag with the corresponding version number. Could this be a problem?
Sorry if this is a basic question, unfortunately a quick google search didn’t reveal much. Thank you for the help so far!