-
-
Notifications
You must be signed in to change notification settings - Fork 165
Closed
Labels
Description
Integration of RBS into Solargraph is officially on the roadmap.
Features
- Map the Ruby core and stdlib with RBS
- Map gems with RBS when sigs are available
- Fall back to YARD for gems that do not provide sigs
Pros
- Ostensibly faster. In my early experiments, mapping from RBS instead of YARD appears to provide a slight performance boost.
- Better support. Updates to core and stdlib signatures are likely to be more frequent and more accurate.
- No need for core docs. It will no longer be necessary to use
solargraph download-coreto update core and stdlib documentation. - YARD will continue to be supported. RBS sigs will be treated as the canonical authority for external libraries when they're available, but Solargraph will still use YARD annotation in workspace maps.
Cons
- Requires Ruby 2.6+. Solargraph currently supports Ruby 2.4+. With integration of RBS, 2.6 will become the minimum requirement.
- Major rearchitecture. The concepts of maps and pins will undergo a thorough redesign.
- Missing features. Some code intelligence provided by YARD may not be currently available in RBS. One known example: RBS does not support protected methods.
Current progress can be previewed on the repo's rbs branch.
numbcoder, kandu, gencer, thomasklemm, natsuokawai and 34 morejunegunn, plashchynski, karniv00l, mcritchlow, akoskovacs and 13 more