Fix template drift for ext/rbs_extension/ast_translation.c - #3038
Merged
Conversation
Commit 0af1d49 renamed the `namespace` parameter of `rbs_intern_type_name` to `type_namespace` (it conflicts with a C++ keyword and broke the `C99_compile` CI job), but only edited the generated `ext/rbs_extension/ast_translation.c`. The template it is generated from still had the old name, so running `rake templates` reverted the fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`confirm_templates` only diffed `include` and `src`, so divergence between `templates/ext/**` and the generated files under `ext/rbs_extension` went undetected -- which is how the stale `namespace` parameter in the previous commit slipped through CI. Every template generates the file it is named after, so derive the paths to check from `templates/**/*.erb` rather than naming directories. That covers `ext`, and `lib/rbs/wasm/serialization_schema.rb` which a directory list would have missed as well, and it cannot fall behind when a template is added. Raise if a template has no generated file at all, so a template missing from the `templates` task is not silently skipped. Also add the "you may need to run `rake templates`" staleness warning rule for `ext` that `src` and `include` already had. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
soutaro
enabled auto-merge
July 28, 2026 04:17
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.
rake templatesreverted thenamespace→type_namespacerename from 0af1d49, which only edited the generatedext/rbs_extension/ast_translation.cand not the template it comes from.namespaceis a C++ keyword and breaks theC99_compilejob, so apply the rename to the template too.CI missed it because
confirm_templatesonly diffedincludeandsrc. Every template generates the file it is named after, so derive the paths to check fromtemplates/**/*.erbinstead of naming directories — that coversextandlib/rbs/wasm/serialization_schema.rb, and it cannot fall behind when a template is added.🤖 Generated with Claude Code