sys/net/nanocoap: add missing dependency to sock_udp#22047
sys/net/nanocoap: add missing dependency to sock_udp#22047maribu wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
816f586 to
b7cf8a3
Compare
| ifneq (,$(filter nanocoap,$(USEMODULE))) | ||
| USEMODULE += sock_udp | ||
| endif | ||
|
|
There was a problem hiding this comment.
Oh wait, but this looks wrong: why would nanocoap being the parser/generator part of the coap api require sock_udp?
In fact, the error message you provide shows an include of nanocoap_sock.h, which should probably not be in sys/net/nanocoap from my understanding.
There was a problem hiding this comment.
Well, in theory nanocoap should only be the parser. But in reality nanocoap is a hot mess. sys/net/application_layer/nanocoap/nanocoap.c includes nanocao_sock.h and therefore depends on sock_udp.h.
There was a problem hiding this comment.
Ah fun, just digged where this is coming from, a commit co-authored by me :P
Don't we have a way to fix this in nanocoap_sock, e.g. by doing the observe stuff before calling coap_handle_req? And thereby fixing the dependencies in nanocoap.c
There was a problem hiding this comment.
To be honest, coap_handle_req() is already out of scope of the CoAP message parsing and message building that pure nanocoap is supposed to be.
There was a problem hiding this comment.
I see. If you think moving these three lines out of coap_handle_req is too cumbersome, I would at least add comments both on those lines and in the Makefile.dep pointing out that this is not the proper dependency/place to have it.
Just imagining myself looking at this in some months from now and being completely confused about it again.
mguetschow
left a comment
There was a problem hiding this comment.
Thanks! Let's squash 🎾
b87729d to
1818821
Compare
|
Shunting in favor of the release note PR |
Contribution description
As the title says
Testing procedure
In
master:This PR
Issues/PRs references
None