Add RBS Support #5856
Closed
corrupt952
started this conversation in
Ideas
Add RBS Support
#5856
Replies: 3 comments
-
Hey @corrupt952, thanks for the suggestion! Ruby type annotation support is definitely something we've discussed internally but are not yet convinced we should be prioritizing yet. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@corrupt952 today, Mongoid has complete code comments with type annotations. It would be fairly easy to write a script that generates RBS from the comments. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks @alexbevi and @johnnyshields for your replies! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the feature
I propose adding RBS (Ruby Signature) support to Mongoid. RBS is Ruby's standard type definition file format, which can be bundled with the gem itself. This addition would greatly enhance the development experience for Mongoid users by providing better code completion, type checking, and documentation within modern IDEs.
Use Case
With the increasing adoption of Language Server Protocol (LSP) in development environments, RBS support would enable:
By incorporating RBS into Mongoid, we can ensure accurate type information for each version of the library, enhancing developer productivity and code quality.
Proposed Solution
sig
directory in the Mongoid gem to store RBS files.Other Information
RBS is gaining traction in the Ruby community, with many popular gems already providing RBS support. Adding this feature to Mongoid would align it with modern Ruby development practices and potentially attract more users who rely on static type checking and enhanced IDE support.
I'm willing to contribute to this effort if the Mongoid team is interested in pursuing this idea. Let me know if you need any additional information or clarification on this proposal.
Beta Was this translation helpful? Give feedback.
All reactions