Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce .rbs files from .rbi files #133

Open
rattrayalex opened this issue May 30, 2022 · 0 comments
Open

Produce .rbs files from .rbi files #133

rattrayalex opened this issue May 30, 2022 · 0 comments
Labels
feature New feature

Comments

@rattrayalex
Copy link

rattrayalex commented May 30, 2022

(Moving from Shopify/rbs_parser#19)

It would be nice for a tool to exist that could translate Sorbet's .rbi files into best-effort .rbs files.

An example use-case is a gem author who wishes to develop with Sorbet and expose .rbs files as well as .rbi to their users.

In general, this could be quite useful in moving the Ruby community forward together around types, by leveraging existing production-grade tools (Sorbet) to support the long-term health of the ecosystem.

According to @Morriar , an easy way to do this might be write a new printer that would output RBS rather than RBI.

Is this a tool you might be willing to build, or to build the underlying API for?

(I might be willing to produce an rbs2rbi CLI package on top of the the API if you like, but I don't think I'd be able to maintain the printer).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants