You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried testing this in the rbi gem but it correctly parsed the module to the last one above
I'll gladly dive into the code to fix this if somebody could point out where this is an issue. I did some code diving as you can see already but I'm a bit lost where
The text was updated successfully, but these errors were encountered:
I don't think the pipeline listens to method calls (send nodes) so we need to have the method definition in tapioca. I think this could be done in rbi although I don't think module_function is very popular so it might not be worth it.
I assume rbi parses "correctly" because it doesn't deal with runtime, so module_function is just a method call and didn't define anything during its execution. rbi would need to be aware of module_function and convert that call into a method node. Similar to how attr_* works https://github.com/Shopify/rbi/blob/main/lib/rbi/rewriters/attr_to_methods.rb (cc @Morriar if you have any thoughts)
When generating
sorbet/rbi/gems/[email protected]
withtapioca gem code_ownership
module_function defined methods will be created without signatures.Specifically
will be turned into
should be turned into
OR
I tried testing this in the
rbi
gem but it correctly parsed the module to the last one aboveI'll gladly dive into the code to fix this if somebody could point out where this is an issue. I did some code diving as you can see already but I'm a bit lost where
The text was updated successfully, but these errors were encountered: