Skip to content

Conversation

@lia-viam
Copy link
Collaborator

@lia-viam lia-viam commented Jan 3, 2025

Cherry-picked from #325

@lia-viam lia-viam requested a review from a team as a code owner January 3, 2025 16:29
@lia-viam lia-viam requested review from purplenicole730 and stuqdog and removed request for a team January 3, 2025 16:29
#include <grpcpp/grpcpp.h>
#include <grpcpp/support/status.h>

#include <viam/api/common/v1/common.pb.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⬆️ - Are the grpcpp headers still required in this file and others?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this particular file no! But while we're on the subject gizmo/api.hpp and summation/api.hpp both include grpcpp/channel.h. This could be replaced with the grpc_fwd.hpp file but I'm not sure if it's worth the effort, thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or rather, not that it takes much effort but that it's a little awkward and perhaps it's a non-goal for users to not have google imports in headers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't bother in the ones that are doing custom APIs, since in that case I think the user is up to something complex, but for cases where it is just using the standard C++ SDK API I'd drop out the grpc headers if possible I think. Otherwise they will get copied in endlessly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, I don't think we should scrub files with custom APIs.

@lia-viam lia-viam merged commit 938d474 into viamrobotics:main Jan 6, 2025
4 checks passed
@lia-viam lia-viam deleted the example-header-cleanup branch January 6, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants