Skip to content

Generate frame parsers from proto definitions - #56

Merged
rijesha merged 4 commits into
mainfrom
copilot/generate-frame-parsers
Nov 30, 2025
Merged

Generate frame parsers from proto definitions#56
rijesha merged 4 commits into
mainfrom
copilot/generate-frame-parsers

Conversation

Copilot AI commented Nov 30, 2025

Copy link
Copy Markdown
Contributor
  • Analyze the issue: Use frame_formats.proto to generate frame parsers for each language
  • Explore existing code structure
  • Design the solution approach
  • Implement frame format parsing in generate.py
    • Added frame_format.py to parse frame format definitions from proto files
    • Added --frame_formats CLI argument to specify the frame formats proto file
  • Implement C frame parser generator (frame_parser_c_gen.py)
  • Implement C++ frame parser generator (frame_parser_cpp_gen.py)
  • Implement TypeScript frame parser generator (frame_parser_ts_gen.py)
  • Implement Python frame parser generator (frame_parser_py_gen.py)
  • Implement JavaScript frame parser generator (frame_parser_ts_gen.py)
  • Test generated parsers
    • Verified C, C++, Python parsers compile and work correctly
  • Run existing test suite (41/42 tests pass, same as before)
  • Run code_review and fix issues
  • Run codeql_checker (no security alerts)
  • Update to skip boilerplate frame parser files when --frame_formats is provided
    • When --frame_formats is provided, only utility boilerplate files are copied
    • Frame parser functionality comes from generated frame_parsers_gen.* files
    • Default behavior (without --frame_formats) remains unchanged
Original prompt

This section details on the original issue you should resolve

<issue_title>Use the frames definition proto file to generate frame parsers for each language.</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 30, 2025 01:15
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Copilot AI changed the title [WIP] Use frames definition proto file to generate frame parsers Generate frame parsers from proto definitions Nov 30, 2025
Copilot AI requested a review from rijesha November 30, 2025 01:21
@rijesha

rijesha commented Nov 30, 2025

Copy link
Copy Markdown
Contributor

I think the ideal scenario is that all boilerplate code is generated by this function.
The boilerplate code will be packaged and just copied and the generation will only happen if that flag with the frame definitions file is passed.
Struct frame developers will be the people most likely to use this code.
@copilot

Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>

Copilot AI commented Nov 30, 2025

Copy link
Copy Markdown
Contributor Author

I think the ideal scenario is that all boilerplate code is generated by this function.
The boilerplate code will be packaged and just copied and the generation will only happen if that flag with the ...

Updated in b1bf4d1. When --frame_formats is provided, only utility boilerplate files are copied and the frame parser boilerplate files (like basic_frame.h, struct_frame_parser.py, etc.) are excluded since all frame parsers come from the generated frame_parsers_gen.* files. Default behavior (without --frame_formats) remains unchanged - all boilerplate files are copied.

@rijesha
rijesha marked this pull request as ready for review November 30, 2025 02:48
@rijesha
rijesha merged commit 7a9cca8 into main Nov 30, 2025
2 checks passed
@rijesha
rijesha deleted the copilot/generate-frame-parsers branch December 6, 2025 03:20
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.

Use the frames definition proto file to generate frame parsers for each language.

2 participants