Skip to content
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

remove api imports from examples #347

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

lia-viam
Copy link
Contributor

@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 stuqdog and purplenicole730 and removed request for a team January 3, 2025 16:29
@@ -13,10 +13,6 @@
#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
Contributor 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
Contributor 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