Server reflection calls should return transitive dependencies
jroper opened this issue · 1 comments
jroper commented
When the server reflection support returns file descriptors, it should not just return the file descriptor requested, but also all that file descriptors transitive dependencies. See:
// This message is used to answer file_by_filename, file_containing_symbol,
// file_containing_extension requests with transitive dependencies. As
// the repeated label is not allowed in oneof fields, we use a
// FileDescriptorResponse message to encapsulate the repeated fields.
// The reflection service is allowed to avoid sending FileDescriptorProtos
// that were previously sent in response to earlier requests in the stream.
FileDescriptorResponse file_descriptor_response = 4;
Right now, we're only returning the file descriptor requested. This causes problems for clients that expect transitive dependencies to be included, and also makes server reflection very slow, because it means each descriptor must be fetched individually. We could of course implement support for tracking which we've already sent on a given stream, and not send them, that would be pretty straight forward.