I maintain the RubyGems, Bundler and the standard libraries of the Ruby language. So, I've been extract many of the standard libraries to default gems and GitHub at Ruby 3.0. But the some of libraries still remains in only Ruby repository. I will describe these situation.
1 of 25
Download to read offline
More Related Content
How to develop the Standard Libraries of Ruby?
1. The future of Ruby ecosystem with GitHub
Hiroshi SHIBATA / GMO Pepabo, Inc.
2021.09.11 RubyKaigi takeout 2021
How to develop the Standard
Libraries of Ruby?
4. Agenda
•The introduction for Gemi
fi
cation of Ruby 3.0, RubyGems
3.2 and Bundler 2.2
•The details of developing the default gems
•The future planf for Ruby 3.1/4.0
7. Gami
fi
cation on Ruby 3.1(TBD)
I will extract the following default gems to bundled gems.
net-ftp
net-imap
Debug
net-pop
net-smtp
English - Rubocop still suggest to use it.
ostruct - A lot of gems depends on it.
date - Rails dependes on it.
…
And I gave up to promote the following default gems.
matrix
prime
8. Which stdlibs will remain in the stdlibs?
I decided to not promote the following gems to the default
gems.
mkmf
rbconfig
objspace
coverage
monitor
ripper
socket
9. Native extension with the bundled gems
•We couldn’t promote the
native extension to the
bundled gems now.
•We need to use installed
Ruby before its installed.
10. The new feature of RG 3.2/Bundler 2.2
•Fixed the priority for multi-source dependencies for
CVE-2020-36327 at “> Bundler 2.2.17”.
•Support Multi-platform.
•You should specify it with `bundle lock --platform …`
•[ANN] I got the privilege for handling the rubygems.org
12. How develop the default gems
•Default gems repository is
located under the https://
github.com/ruby
•It has a GitHub actions,
enabled pull-request. So,
you can develop typically
github work
fl
ow.
13. The differences with ruby/ruby and ruby/*
$ autoreconf
$ ./con
fi
gure —disable-install-doc
$ make -j
$ make check
You can run the test suite with under the repository.
$ bundle install
$ rake test
ruby/ruby
ruby/*
14. How merge the default gems to ruby/ruby
•Default gems side(ruby/*)
•Copy ruby/ruby. Run `make check`, If tests failed, I
fi
xed
them and backport to default gems.
•Stdlibs side(ruby/ruby)
•Backport ruby/*. Run `rake test`, If tests failed, I
fi
xed
them and forwardport to stdlibs.
15. sync_default_gems.rb
This script manage the commits
between ruby/ruby and ruby/*.
•Pick single commit or
commits from ruby/* to ruby/
ruby.
•Add URL for the original
commits of ruby/* to commit
message.
16. Migrate minitest to test-unit
•In the past, We use the
custom test framework of
Ruby repository for the
default gems.
•I migrated them to test-unit
+ the custom assertions.
•I want to simple mock with
test-unit.
17. What’s CoreAssertion?
•This provides the advanced
usage of ruby interpreter
tests
•Integrate envutil
•Add Custom assertions
•Handle test-unit and minitest
differences
19. JRuby migration
•Finally, We can migrate JRuby
port to the default gems.
•We could care the both
speci
fi
cation at one
repository.
•But We should coordinate the
license of JRuby code.
20. Avoid to use `--disabled-gems`
•Ruby have a `--disabled-gems`
for the Ruby core development.
•We considered to disable/
remove it from distributed
version because the users
misunderstood its usage.
•We should improve the its
performance.
21. Bump up RubyGems/Bundler
We will merge into RubyGems 3.3 and Bundler 2.3 into Ruby
3.1.0-dev. But We have no plan to release RG 4.0 and
Bundler 3.0
Ruby
Bundler
RubyGems
3.0 3.1
3.1
2.1
3.2 4.0
?
2.2
?
22. Activation issues about the default gems
We still have a activation
issue with RubyGems and
the default gems.
•tsort
•…
We should rewrite it with
pure ruby inplementation.
23. We need the contributors for the default gems
•We need to your help the following topics
•Ractor support
•Documentation
•We can give write grant for the default gems repository like
ruby/*.
•It’s not ruby-commiter but you can commit to stdlib.
25. Conclusion
I introduced the following topics.
•The current status of gemi
fi
cation at Ruby 3.1
•The details of developing the default gems
•The future plan for RubyGems/Bundler and Gemi
fi
cation
Let’s join to #rubygems of ruby-jp slack and talk about
them.