SketchUp / ruby-api-stubs

Auto-generated stubs for the SketchUp Ruby API. Useful for IDE intellisense and auto-complete.
MIT License
22 stars 14 forks source link

Q: What will RBS files bring to IDEs or the API documentation ? #80

Open DanRathbun opened 1 year ago

DanRathbun commented 1 year ago

Q: What will RBS files bring to IDEs or the API documentation ?

I've noticed your producing RBS definitions for the Ruby APIs.

I'm wondering what will this do the the stubs?

What can it do for IDEs as far as Intellisense, code checking etc.

Will it effect the YARD documentation ?

thomthom commented 1 year ago

That's what I was trying to figure out. In order to setup an extension with RBS tooling I needed to generate RBS definition for the SU API.

It caught a number of YARD syntax issues that YARD doesn't warn about. On the other hand, RBS syntax and the syntax used by various RBS tools are not consistent and not always on par with YARD, making auto-generation a challenge. Had to resort to patching after the fact for a few things.

From what I've experienced so far, YARD documentation along with Solargraph (or RubyMine's code insight) gives a decent intellisense to the IDEs. But what RBS should open up for is deeper full application analysis. Checking the code paths, whenever that is possible with a dynamic language such as Ruby, and warn about issues that you'd otherwise catch at run-time.

But the RBS tooling still seem to be in early stages.