You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix websocket server proto definitions to include top-level enums
The websocket server's "protos" request handler was using
descriptor->DebugString() which only outputs message definitions,
causing top-level enums (like PixelFormatType) to be omitted from
the generated proto definitions sent to clients.
This caused protobuf.js clients to fail parsing the definitions
because messages referenced enum types that were never defined.
Changes:
- Extract and include all top-level enums from each proto file
- Use fileDescriptor->enum_type_count() to iterate enums
- Add deduplication sets for both files and enums
- Keep using descriptor->DebugString() for messages to avoid
including import statements that would break single-file parsing
The generated proto now includes all necessary enum definitions
while remaining compatible with protobuf.js single-file parsing.
Fixes missing PixelFormatType, SphericalCoordinatesType, and other
top-level enums in the websocket proto definitions.
Signed-off-by: cmeng <[email protected]>
0 commit comments