j/k. sorbet-rails maintainer here. I agree with the assessment that sorbet doesn't go out of the way to support some Rails feature, eg method overloading or scoping block accurately. Sorbet tool is opinionated about some of the design choices that makes it hard to support Rails' extensive use of meta-programming. That said, Sorbet is still useful in checking the custom code we write on top of Rails and their interactions. It may be hard to type the model files themselves, but we can type-check the code making use of the models! Recently, I started a new project on Rails and it's quite fun building it with type from scratch :D
I find Sorbet a very helpful tool for development. I hope people will give it a try and contribute to tools around it (sorbet-rails included) so that we have great tools to use!
I did not mean to put down sorbet-rails - it has been really useful to us and we appreciate all the work you and your team have put in to it!
But I do have the sense that building Rails apps using sorbet won't feel "first class" until we have some sorbet maintainers that use Rails or the Rails team starts adopting sorbet (or both!)
Yeah, I totally agree with this. In some way, it's the difference in philosophical approach of the two system that it'll be hard to reconcile. Eg: Rails favors convenience (method that just works under various condition), whereas Sorbet favors explicitness (no method overloading, typed struct class instead of hash)
j/k. sorbet-rails maintainer here. I agree with the assessment that sorbet doesn't go out of the way to support some Rails feature, eg method overloading or scoping block accurately. Sorbet tool is opinionated about some of the design choices that makes it hard to support Rails' extensive use of meta-programming. That said, Sorbet is still useful in checking the custom code we write on top of Rails and their interactions. It may be hard to type the model files themselves, but we can type-check the code making use of the models! Recently, I started a new project on Rails and it's quite fun building it with type from scratch :D
I find Sorbet a very helpful tool for development. I hope people will give it a try and contribute to tools around it (sorbet-rails included) so that we have great tools to use!
For those who are interested in the topic, I outlined some of the technical challenges with using Sorbet on rails here https://medium.com/czi-technology/static-type-checking-in-ra...