Add Rake task for creating an autogenerated rbi #1936
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue#
#1854
Description:
This is a WIP PR. It also includes commits from #1853 and #1935.
I'm using the same system as I did in December (described in this gist) and it still works perfectly fine, so I'm comfortable recommending it now.
The Sord generator isn't perfect, so this requires a few workarounds to fix some invalid code within the generated RBI, that's all handled in the Sord Rake task.
I'll work on getting a new Sord release out so we can add it as a development dependency in the gemspec rather than a dependency in the Gemfile itself.
If you'd prefer not to have to maintain this as part of the gem, I'm fine with that and I can add it to sorbet-typed instead. This is mostly an experiment to see if autogenerated types like this are viable.
See the Sorbet docs on RBIs within gems.