Required file not being referenced during gem RBI building
maxveldink opened this issue ยท 1 comments
Howdy ๐๐ป I'm trying to trace through an issue I'm seeing with generating RBIs for sorbet-schema. The standard gem compiler works well for the library, except for some extension methods that we're monkey-patching on to T::Struct
.
We do require it in the primary gem entry point, and it's loaded correctly when the gem is loaded. However, when Tapioca compiles the gem RBIs, it's missing these definitions on T::Struct
. It does correctly add the other files we require in the entry point.
I've tried specifying that file in the require.rb
of the downstream projects, but it's still ignored. We manually shim it for each project. I still need to try exporting the hand-written RBI, but before I make a new release to try that, I wanted to validate if this was a bug with the gem compiler, since, from my understanding, this should be picked up without any extra steps.
It's probably being ignored because it's part of the payload
tapioca/lib/tapioca/gem/pipeline.rb
Lines 390 to 392 in df6e272
This is a fundamental part of tapioca and I doubt it'll change but I think including it in
rbi/
folder should work.