Skip to content

Remove the single-file generator - #582

Merged
leighmcculloch merged 5 commits into
mainfrom
remove-single-file-generator-output
Sep 10, 2026
Merged

leighmcculloch merged 5 commits into
mainfrom
remove-single-file-generator-output

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

What

Remove the single-file generator.

Minor refactor of the multi-file generator to support getting at the output before it hits the disk.

Why

The single-file generator is only used by tests. A while ago we changed the xdr lib to render a multi-file output, and that's the only format we should be maintaining moving forward, and we should be exercising as much of that flow in tests as possible.

The multi-file generator wrote the output directly to disk, and required a small refactor to support getting at the output in tests.

@leighmcculloch leighmcculloch changed the title Remove the single-file generator renderer Remove the single-file generator Sep 10, 2026
@leighmcculloch
leighmcculloch marked this pull request as ready for review September 10, 2026 02:33
@leighmcculloch
leighmcculloch requested review from a team and a balanced review from Copilot September 10, 2026 02:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the obsolete single-file generator and makes multi-file generation reusable in tests.

Changes:

  • Deletes the single-file template and output API.
  • Extracts callback-based multi-file generation.
  • Migrates generator tests to the multi-file path.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
templates/generated.rs.jinja Removes the single-file template.
src/output.rs Removes GeneratedTemplate.
src/generator.rs Adds callback-based output handling.
src/tests/generator.rs Uses the multi-file generator in tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread xdr-generator-rust/generator/src/tests/generator.rs
@leighmcculloch
leighmcculloch added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 49f4761 Sep 10, 2026
62 checks passed
@leighmcculloch
leighmcculloch deleted the remove-single-file-generator-output branch September 10, 2026 17:29
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