golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
65 stars 20 forks source link

Backport lightDB delete so it is available with nRF targets #178

Closed szczys closed 2 years ago

szczys commented 2 years ago

Describe the feature

lightDB delete was added to the api with #155. This should be backported to 309597316d6963832bb777f901e5c869f99daff3 so that it is available when building for nRF91 targets.

Issue was discovered when building an app with golioth_lightdb_delete() on ESP32, then testing it on nRF9160 and build fails:

/home/mike/golioth-compile/AgTech-Soil/fw/src/main.c: In function 'delete_control_endpoint':
/home/mike/golioth-compile/AgTech-Soil/fw/src/main.c:231:8: warning: implicit declaration of function 'golioth_lightdb_delete'; did you mean 'golioth_lightdb_set'? [-Wimplicit-function-declaration]
  231 |  ret = golioth_lightdb_delete(client,
      |        ^~~~~~~~~~~~~~~~~~~~~~
      |        golioth_lightdb_set

Current workaround is:

/* FIXME: Golioth SDK for nRF91 is behind and doesn't yet include this command */
#ifndef CONFIG_SOC_NRF9160_SICA
ret = golioth_lightdb_delete(client, GOLIOTH_LIGHTDB_PATH("cmd_led"));
#endif

Existing feature reference

golioth_lightdb_delete()

mniestroj commented 2 years ago

I don't understand that issue. Could you check if that is still valid? golioth_lightdb_delete() should be visible both in vanilla Zephyr and NCS variants.

szczys commented 2 years ago

This issue is no longer valid.