-
Notifications
You must be signed in to change notification settings - Fork 2
Description
First of all, thanks so much for open-rts! This looks like a lot of well-abstracted, clean code. Thank you for doing all this and putting it out there for folks to use!
Attempting to use the library using PlatformIO, on a non-Arduino platform results in this error:
Framework incompatible library ../.piolibdeps/somfytest/Open RTS
More details about "Library Compatibility Mode": https://docs.platformio.org/page/librarymanager/ldf.html#ldf-compat-mode
...and indeed, if you look at the Open RTS Compatibility tab on the registry, it only mentions Arduino.
The error can be worked around by setting lib_compat_mode to off, which of course frowned upon.
The proper fix, I believe, is to ship a library.json with proper metadata, that includes:
"frameworks": "*",
"platforms": "*",While at it, you should define a few more bits of metadata, like e.g. license, as the registry currently says "Unknown".
The full spec can be found on the PlatformIO docs, including a reference to a helpful pio pkg pack validator.
What I believe happens is that in the absence of library.json, PlatformIO falls back to thinking this is an Arduino-only library, and uses library.properties instead. Since your library supports more than just Arduino, library.json feels more appropriate.
(On an unrelated manner, I was surprised to see a space in the name in the registry, "Open RTS". Apparently everything works, but it's quite unusual! Perhaps it'd be worthwhile to be consistent with regards to the name, "open-rts" vs. "openrts" vs. "Open RTS"?)
Note that this all very new to me and I may be on the wrong path here. Please validate my assumptions 😄