Using RBS based tools like rbs_rails and steep requires adding gem entries in rbs_collection.yaml.
gems:
- name: rbs
ignore: true
- name: steep
ignore: true
This is annoying and causes problems, and it looks wired because the gems section is mainly used to ignore libraries.
I'd like to propose changing the library RBS loading protocol:
- Skip loading RBS files from gems that is declared in
Gemfile with require: false
require: false is usually written for gems that is not loaded from the application, especially in Rails apps, and we can use it as a marker that implies RBS files of the gems are unnecessary.
The steps to load RBS of libraries will be as following:
- Require gems that is declared in
gems section of rbs_collection.yaml without ignore: true
- Require gems and their dependencies from Bundler context that doesn't have
require: false (and skip if it's ignored)
With this change, the rbs_rails and steep users would change their Gemfile lines as:
gem 'steep', require: false
gem 'rbs_rails', require: false
It looks better and more intuitive than having ignore: true lines in rbs_collection.yaml. 😄
Using RBS based tools like
rbs_railsandsteeprequires addinggementries inrbs_collection.yaml.This is annoying and causes problems, and it looks wired because the
gemssection is mainly used to ignore libraries.I'd like to propose changing the library RBS loading protocol:
Gemfilewithrequire: falserequire: falseis usually written for gems that is not loaded from the application, especially in Rails apps, and we can use it as a marker that implies RBS files of the gems are unnecessary.The steps to load RBS of libraries will be as following:
gemssection ofrbs_collection.yamlwithoutignore: truerequire: false(and skip if it's ignored)With this change, the
rbs_railsandsteepusers would change theirGemfilelines as:It looks better and more intuitive than having
ignore: truelines inrbs_collection.yaml. 😄