rbs icon indicating copy to clipboard operation
rbs copied to clipboard

Move stdlib/rubygems/ to core/rubygems/

Open pocke opened this issue 4 years ago • 1 comments

I propose to move RubyGems library's RBS from stdlib to core.

In Ruby, rubygems is loaded by default unless --disable-gems is given. --disable-gems option is provided only for debugging Ruby core. So we can suppose rubygems is loaded always.

But currently RBS provides rubygems as a standard library, so the user needs to load rubygems explicitly in RBS. It is different from Ruby.

So I think RBS should provide rubygems as a core library.

Cons

  • Performance
    • Loading RBSs will be slower by this change to parse/load rubygems.rbs.
    • I guess the parsing cost is small so we can ignore it.
  • Compatibility
    • If rubygems library is used in existing code, it will causes a load error (or something) by this change.
    • For example, library 'rubygems' in Steepfile will raise an error if rubygems library is gone.

pocke avatar Jan 18 '22 08:01 pocke

Sounds good! 👍

soutaro avatar Jan 20 '22 06:01 soutaro