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

Use RBS type annotations instead of Sorbet #68

Open
johnnyshields opened this issue Feb 1, 2023 · 1 comment
Open

Use RBS type annotations instead of Sorbet #68

johnnyshields opened this issue Feb 1, 2023 · 1 comment

Comments

@johnnyshields
Copy link

johnnyshields commented Feb 1, 2023

Sorbet is nice, but it's a pain to make everyone install it in production apps since it's not widely used and is not part of Ruby core.

Instead, Sorbet should be a development_dependency, and this gem should use *.rbs files to annotate types which are the Ruby-core way and can be read by Sorbet. The Ruby .rb files should be kept clean of Sorbet markup.

I think this is a best practice for gem maintainers.

Please let me know if you'd accept a PR for this.

@ignacio-chiazzo
Copy link
Owner

ignacio-chiazzo commented Feb 1, 2023

but it's a pain to make everyone install it in production apps

Update: Done ✅
I 100% agree it shouldn't be part of production apps. Instead, it should be development dependency only for this library.

Instead, Sorbet should be a development_dependency,

I'd be happy to merge a PR that makes it a development dependency.

this gem should use *.rbs files to annotate types which are the Ruby-core way and can be read by Sorbet. The Ruby .rb files should be kept clean of Sorbet markup.

I'd have to research how the RBs parser works for Sorbet. If it works well and both are compatible, we could give it a try. I'd happily accept a PR that changes a few files, and we can progressively change the others.

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

No branches or pull requests

2 participants