Remove the single-file generator - #582
Merged
Merged
Conversation
leighmcculloch
marked this pull request as ready for review
September 10, 2026 02:33
leighmcculloch
requested review from
a team
and
a balanced review from Copilot
September 10, 2026 02:33
leighmcculloch
enabled auto-merge
September 10, 2026 02:34
Contributor
There was a problem hiding this comment.
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.
dmkozh
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.