-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-9549: Make RpcSubtype model api ResourceRPCSubtype #349
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm though per offline conversation, before we merge I would love to see confirmation that we can actually run this and use resources (both built-ins and new modular types) after removing the ServiceDescriptor
.
src/viam/sdk/module/handler_map.hpp
Outdated
|
||
class HandlerMap; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) should have // namespace v1
at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grr yes clang-format loves to not put them in
Changes the implementation of an SDK type to more closely model its corresponding API type. Note that handler_map.cpp contains what is more or less the to_proto and from_proto of RPCSubtype, so we remove the ServiceDescriptor member.
The comparison operators in this and some other classes have been optimized to not construct a concatenated string every time they're called
Also includes some drive-by changes for domino-effect missing includes, minor cleanups, etc
Per @stuqdog we're not sure why RPCSubtype originally had a ServiceDescriptor member--it seems its only use was in using the DebugString to implement
operator<
to make RPCSubtype usable as amap
key. I'm not sure what tests if any will exercise that this is still behaving as expected or if we know why this might have been implemented that way in the first place, cc @acmorrow for any ideas or sugestions