Repository navigation
Extend T::Generic in Tapioca DSL compilers - #24219
Merged
Merged
Conversation
Signed-off-by: Patrick Linnane <patrick@linnane.io>
MikeMcQuaid
approved these changes
Oct 10, 2026
Member
|
Thanks! |
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.
Tapioca 0.20 declares
Tapioca::Dsl::Compiler'sConstantTypein an RBS comment, which only becomesextend T::Genericwhen Tapioca's RBS rewriter transforms the file as it loads. Our DSL compilers calltype_member, so they depend on that rewrite.brew typecheck --updategets it, but specs thatrequire "tapioca/dsl"don't (they patchedTapioca::Dsl::Compilerinstead) and neither does Tapioca run insidebrew ruby, where Homebrew's Bootsnap is already set up. Loading the compilers there fails withundefined method 'type_member' for class Tapioca::Compilers::ApiStructs.Each compiler now extends
T::Genericitself, so the spec patches are removed.brew typecheck --updateregenerates every DSL RBI unchanged.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Opus 5.5) traced the failure, wrote the change and ran
brew lgtm --online, checking that both specs fail to load without it once their patches are removed and thatbrew typecheck --updateleaves every DSL RBI unchanged. Codex (GPT-6 Astra) reviewed it, independently reproducing those results and tracing why the rewrite is skipped under Bootsnap. I reviewed the diff.