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

Audit additional_proto_files #14518

Open
dbolduc opened this issue Jul 20, 2024 · 0 comments
Open

Audit additional_proto_files #14518

dbolduc opened this issue Jul 20, 2024 · 0 comments
Labels
cpp: generator Issues related to the C++ micro-generator type: cleanup An internal cleanup or hygiene concern.

Comments

@dbolduc
Copy link
Member

dbolduc commented Jul 20, 2024

LROs have an annotation for their returned metadata type. Proto syntax does not require imports for the proto files that define these metadata types. In C++ we have to include these files.

Our intention for additional_proto_files was to add includes for these extra *.pb.h headers.

Turns out that when we feed them into protoc we treat them the same as any other service's proto file.

args.emplace_back(service.service_proto_path());
for (auto const& additional_proto_file : service.additional_proto_files()) {
args.emplace_back(additional_proto_file);
}

This leads to some weirdness in the generator config. In notebooks and run, we rely on this behavior to generate some clients (and avoid #7997). In containeranalysis, we accidentally generate a client for grafeas which we did not intend to. Oops.

We should sort this out.

@dbolduc dbolduc added type: cleanup An internal cleanup or hygiene concern. cpp: generator Issues related to the C++ micro-generator labels Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp: generator Issues related to the C++ micro-generator type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant