ignacio-chiazzo/ruby_whatsapp_sdk

Use RBS type annotations instead of Sorbet

Closed this issue · 2 comments

Sorbet is nice, but it's a pain to make everyone install it in production apps since it's not widely used and is not part of Ruby core.

Instead, Sorbet should be a development_dependency, and this gem should use *.rbs files to annotate types which are the Ruby-core way and can be read by Sorbet. The Ruby .rb files should be kept clean of Sorbet markup.

I think this is a best practice for gem maintainers.

Please let me know if you'd accept a PR for this.

but it's a pain to make everyone install it in production apps

Update: Done ✅
I 100% agree it shouldn't be part of production apps. Instead, it should be development dependency only for this library.

Instead, Sorbet should be a development_dependency,

I'd be happy to merge a PR that makes it a development dependency.

this gem should use *.rbs files to annotate types which are the Ruby-core way and can be read by Sorbet. The Ruby .rb files should be kept clean of Sorbet markup.

I'd have to research how the RBs parser works for Sorbet. If it works well and both are compatible, we could give it a try. I'd happily accept a PR that changes a few files, and we can progressively change the others.

@johnnyshields Thanks for your feedback. After consideration, and multiple requests to remove Sorbet I decided to remove it entirely from the codebase as part of the 0.13.0 release. #149