SlideShare a Scribd company logo
The roadmap of RubyGems for Ruby 3.0
Hiroshi SHIBATA / GMO Pepabo, Inc.
2020.09.05 RubyKaigi takeout 2020
Dependency Resolution with
Standard Libraries
Hiroshi SHIBATA @hsbt
https://www.hsbt.org
Executive Officer VP of Engineering
Technical Director
at GMO Pepabo, Inc. @pepabo
Agenda
•The introduction for RubyGems 3.1 and Bundler 2.1
•Recent Update for RubyGems 3.2 and Bundler 2.2
•The feature plan and Roadmap for Ruby 3.0
The introduction for
RubyGems 3.1 and Bundler 2.1
What’s new in RubyGems 3.1?
RubyGems 3.1 has been released at 16 Dec, 2019
https://blog.rubygems.org/2019/12/16/3.1.0-released.html
The key features:
• Add the multi-factor authentication for `gem yank` command
• Cleanup the compatibility code of Ruby 1.8 and 1.9
• Bundle Bundler 2.1
Lazily load the default gems
We make these library to
lazily load in RubyGems.
•open3
•uri
It did prevent that you
specify the several versions
of the default gems.
What’s new in Bundler 2.1?
Bundler 2.1 has been released at 15 Dec, 2019.
https://github.com/bundler/bundler/releases/tag/v2.1.4
The key features:
• There is no incompatible feature from Bundler 2.0.x(maybe…)
• Cleanup the compatibility code of Ruby 1.8 and 1.9
• Tuned on the deprecation warnings for Bundler 3
Tuned on the deprecation warnings for v3
•`bundle console`
•`bundle viz`
•`bundle inject`
Bundler::SharedHelpers.major_deprecation 2
•Bundler.environment →
Bundler.load
•Bundler.clean_{env,exec} →
Bundler.unbundled_{env,exec}
•Bundler.with_clean_env →
Bundler.with_unbundled_env
Recent Update for
RubyGems 3.2 and Bundler 2.2
RubyGems/Bundler integration
We merged bundler org into
rubygems org.
The repository, team,
maintainers was merged.
RubyGems/Bundler integration
•We also merged bundler
repo into rubygems repo as
monorepo.
•The commits, CI, mainainers
documents was merged
Before
After
Recent Works
We still use separated release
workflow about RubyGems
and Bundler. We try to merge
these toolchains at first.
•Rubocop Rule 🤖
•Changelog(or History.txt) 📚
Bump up RubyGems/Bundler
We will merge into RubyGems 3.2 and Bundler 2.2 into Ruby
2.8.0-dev. After that, RubyGems 4.0 will be merge Ruby 3.
Ruby
Bundler
RubyGems
2.7.0 3.0
3.1
2.0
3.0
2.1
3.2 4.0
?
2.2
Gemification for Ruby 3
Standard
Libraries
Default
Gems
Bundled
Gems
Pure Ruby 22 36 6
C extensions 12 17 0
This matrix shows number of standard libraries and their
classifications in Ruby 2.7.
Gemification for Ruby 2.7
Gemification for Ruby 2.8/3.0
Notable Changes
•`net-telnet` was removed from the bundled gems
•`rexml` and `rss` promoted the bundled gems from the default gems.
I’ll work to publish the all of stdlib to the default gems
•Except to use `internal.h` or `internal/*.h` and depends on Ruby version
•Ex. mkmf.rb, objspace, pty, ripper, socket, coverage
Gamification on Ruby 3.0(TBD)
We will extract the standard libraries to the default gems.
Abbrev
Base64
DEBUGGER__
DRb
ERB
Find
OpenURI
OptionParser
PP
PrettyPrinter
resolv-replace.rb
Resolv
Rinda
SecureRandom
Set
Shellwords
Time
TSort
un.rb
Digest
IO(wait and nonblack)
Monitor(Ruby 2.6 version)
NKF
Pathname
Syslog
Win32API
WIN32OLE
Activation issues about the default gems
You couldn’t use the specified
version of default gems like json
when RubyGems/Bundler activated
them.
When RubyGems uses json-2.1.0, You
couldn’t use json 1.8.x. Because ruby
gems and rubygems.org never uses
JSON format. Because Bundler still
use the original implementation for
YAMLSerializer.
What should we do?
1. Don’t use the default gems in `Bundler.setup`,
`Kernel#require` and etc.
→ 😆
2. Vendoring approach when RubyGems uses only pure ruby
libraries like URI.
→ 😩
3. Rewrite pure ruby code without the default gems.
→ 😩
Rewrite the default gems to Ruby code
We should rewrite the URI and FileUtils without the default
gems.
Ex. Bundler uses FileUtils with the following methods.
• FileUtils.mkdir_p
• FileUtils.cp_r
• FileUtils.rm_rf
• FileUtils.touch
Gamification on Ruby 3.0(TBD)
We should keep the following gems with irb and rubygems. We will extract
the default gems to the bundled gems without them.
did_you_mean
fileutils
forwardable
io/console
reline
readline-ext
delegate
pathname
set
tsort
pathname
And also keep the following gems for `bundle exec`.
tempfile
timeout
tmpdir
The major problem for the bundled gems
If you use Bundler, you need to add the bundled gems into your Gemfile.
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "english"
gem “uri”
gem “openssl”
…
I need to consider to transition and migration plan for this. But I have no
idea yet. Maybe, I will add the some mechanism to Bundler internal to care
about this.
Conclusion
Conclusion
•Finally, We will start to merge RubyGems and Bundler for
unifying the one command.
•I’m working to extract stdlib to the default gems in Ruby3
•We should remove the current dependency from rubygems
and bundler.
Let’s join to #rubygems in ruby-jp slack

More Related Content

What's hot (20)

PDF
How to distribute Ruby to the world
Hiroshi SHIBATA
 
PDF
How to Begin to Develop Ruby Core
Hiroshi SHIBATA
 
PDF
The Future of library dependency management of Ruby
Hiroshi SHIBATA
 
PDF
The Future of library dependency manageement of Ruby
Hiroshi SHIBATA
 
PDF
OSS Security the hard way
Hiroshi SHIBATA
 
PDF
Middleware as Code with mruby
Hiroshi SHIBATA
 
PDF
20140419 oedo rubykaigi04
Hiroshi SHIBATA
 
PDF
20140425 ruby conftaiwan2014
Hiroshi SHIBATA
 
PDF
The Future of Bundled Bundler
Hiroshi SHIBATA
 
PDF
Gemification plan of Standard Library on Ruby
Hiroshi SHIBATA
 
PDF
RubyGems 3 & 4
Hiroshi SHIBATA
 
PDF
20140918 ruby kaigi2014
Hiroshi SHIBATA
 
PDF
The details of CI/CD environment for Ruby
Hiroshi SHIBATA
 
PDF
20140925 rails pacific
Hiroshi SHIBATA
 
PDF
Large-scaled Deploy Over 100 Servers in 3 Minutes
Hiroshi SHIBATA
 
PDF
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 
PDF
The secret of programming language development and future
Hiroshi SHIBATA
 
PDF
How DSL works on Ruby
Hiroshi SHIBATA
 
PDF
Ruby Security the Hard Way
Hiroshi SHIBATA
 
PDF
Middleware as Code with mruby
Hiroshi SHIBATA
 
How to distribute Ruby to the world
Hiroshi SHIBATA
 
How to Begin to Develop Ruby Core
Hiroshi SHIBATA
 
The Future of library dependency management of Ruby
Hiroshi SHIBATA
 
The Future of library dependency manageement of Ruby
Hiroshi SHIBATA
 
OSS Security the hard way
Hiroshi SHIBATA
 
Middleware as Code with mruby
Hiroshi SHIBATA
 
20140419 oedo rubykaigi04
Hiroshi SHIBATA
 
20140425 ruby conftaiwan2014
Hiroshi SHIBATA
 
The Future of Bundled Bundler
Hiroshi SHIBATA
 
Gemification plan of Standard Library on Ruby
Hiroshi SHIBATA
 
RubyGems 3 & 4
Hiroshi SHIBATA
 
20140918 ruby kaigi2014
Hiroshi SHIBATA
 
The details of CI/CD environment for Ruby
Hiroshi SHIBATA
 
20140925 rails pacific
Hiroshi SHIBATA
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Hiroshi SHIBATA
 
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA
 
The secret of programming language development and future
Hiroshi SHIBATA
 
How DSL works on Ruby
Hiroshi SHIBATA
 
Ruby Security the Hard Way
Hiroshi SHIBATA
 
Middleware as Code with mruby
Hiroshi SHIBATA
 

Similar to Dependency Resolution with Standard Libraries (20)

PDF
How to develop the Standard Libraries of Ruby?
Hiroshi SHIBATA
 
PDF
Ruby Presentation
platico_dev
 
PDF
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
Michael Kimathi
 
PDF
The story of language development
Hiroshi SHIBATA
 
KEY
Why Bundler 1.1 will be much faster
Pat Shaughnessy
 
PDF
Packaging perl (LPW2010)
p3castro
 
PDF
Inside GitHub with Chris Wanstrath
SV Ruby on Rails Meetup
 
PDF
IDE, Terminal and SCM to work with Ruby on Rails
Henry Le
 
PDF
Using a Private Git Server for Packaging Software
Chris Jean
 
PPTX
Gitlikeapro 2019
Jesús Miguel Benito Calzada
 
PDF
Introduction of Cybersecurity with Ruby at RedDotRubyConf 2024
Hiroshi SHIBATA
 
PPTX
11 Ruby Gems
Deepak Hagadur Bheemaraju
 
PPTX
Building gRPC services
Robert Robinson
 
PDF
Christmas present for you
Kazuki Tanaka
 
PPTX
Introduction to Ruby Native Extensions and Foreign Function Interface
Oleksii Sukhovii
 
PDF
Go at Skroutz
AgisAnastasopoulos
 
ODP
Debugging Rails 3 Applications
Nathan Broadbent
 
PDF
FOSDEM 2017: GitLab CI
OlinData
 
PDF
Ruby Best Practices Increase Your Productivity Write Better Code 1st Edition ...
forbahchonev
 
PDF
PDF Ruby on Rails 3 Day BC
Northwest Independent Ruby Development
 
How to develop the Standard Libraries of Ruby?
Hiroshi SHIBATA
 
Ruby Presentation
platico_dev
 
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
Michael Kimathi
 
The story of language development
Hiroshi SHIBATA
 
Why Bundler 1.1 will be much faster
Pat Shaughnessy
 
Packaging perl (LPW2010)
p3castro
 
Inside GitHub with Chris Wanstrath
SV Ruby on Rails Meetup
 
IDE, Terminal and SCM to work with Ruby on Rails
Henry Le
 
Using a Private Git Server for Packaging Software
Chris Jean
 
Introduction of Cybersecurity with Ruby at RedDotRubyConf 2024
Hiroshi SHIBATA
 
Building gRPC services
Robert Robinson
 
Christmas present for you
Kazuki Tanaka
 
Introduction to Ruby Native Extensions and Foreign Function Interface
Oleksii Sukhovii
 
Go at Skroutz
AgisAnastasopoulos
 
Debugging Rails 3 Applications
Nathan Broadbent
 
FOSDEM 2017: GitLab CI
OlinData
 
Ruby Best Practices Increase Your Productivity Write Better Code 1st Edition ...
forbahchonev
 
PDF Ruby on Rails 3 Day BC
Northwest Independent Ruby Development
 
Ad

More from Hiroshi SHIBATA (10)

PDF
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
PDF
Long journey of Ruby Standard library at RubyKaigi 2024
Hiroshi SHIBATA
 
PDF
Long journey of Ruby standard library at RubyConf AU 2024
Hiroshi SHIBATA
 
PDF
Deep dive into Ruby's require - RubyConf Taiwan 2023
Hiroshi SHIBATA
 
PDF
How resolve Gem dependencies in your code?
Hiroshi SHIBATA
 
PDF
How resolve Gem dependencies in your code?
Hiroshi SHIBATA
 
PDF
Ruby コミッターと歩む Ruby を用いたプロダクト開発
Hiroshi SHIBATA
 
PDF
Why ANDPAD commit Ruby and RubyKaigi?
Hiroshi SHIBATA
 
PDF
RailsGirls から始める エンジニアリングはじめの一歩
Hiroshi SHIBATA
 
PDF
Productive Organization with Ruby
Hiroshi SHIBATA
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Long journey of Ruby Standard library at RubyKaigi 2024
Hiroshi SHIBATA
 
Long journey of Ruby standard library at RubyConf AU 2024
Hiroshi SHIBATA
 
Deep dive into Ruby's require - RubyConf Taiwan 2023
Hiroshi SHIBATA
 
How resolve Gem dependencies in your code?
Hiroshi SHIBATA
 
How resolve Gem dependencies in your code?
Hiroshi SHIBATA
 
Ruby コミッターと歩む Ruby を用いたプロダクト開発
Hiroshi SHIBATA
 
Why ANDPAD commit Ruby and RubyKaigi?
Hiroshi SHIBATA
 
RailsGirls から始める エンジニアリングはじめの一歩
Hiroshi SHIBATA
 
Productive Organization with Ruby
Hiroshi SHIBATA
 
Ad

Recently uploaded (20)

PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
The Future of Artificial Intelligence (AI)
Mukul
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 

Dependency Resolution with Standard Libraries

  • 1. The roadmap of RubyGems for Ruby 3.0 Hiroshi SHIBATA / GMO Pepabo, Inc. 2020.09.05 RubyKaigi takeout 2020 Dependency Resolution with Standard Libraries
  • 2. Hiroshi SHIBATA @hsbt https://www.hsbt.org Executive Officer VP of Engineering Technical Director at GMO Pepabo, Inc. @pepabo
  • 3. Agenda •The introduction for RubyGems 3.1 and Bundler 2.1 •Recent Update for RubyGems 3.2 and Bundler 2.2 •The feature plan and Roadmap for Ruby 3.0
  • 4. The introduction for RubyGems 3.1 and Bundler 2.1
  • 5. What’s new in RubyGems 3.1? RubyGems 3.1 has been released at 16 Dec, 2019 https://blog.rubygems.org/2019/12/16/3.1.0-released.html The key features: • Add the multi-factor authentication for `gem yank` command • Cleanup the compatibility code of Ruby 1.8 and 1.9 • Bundle Bundler 2.1
  • 6. Lazily load the default gems We make these library to lazily load in RubyGems. •open3 •uri It did prevent that you specify the several versions of the default gems.
  • 7. What’s new in Bundler 2.1? Bundler 2.1 has been released at 15 Dec, 2019. https://github.com/bundler/bundler/releases/tag/v2.1.4 The key features: • There is no incompatible feature from Bundler 2.0.x(maybe…) • Cleanup the compatibility code of Ruby 1.8 and 1.9 • Tuned on the deprecation warnings for Bundler 3
  • 8. Tuned on the deprecation warnings for v3 •`bundle console` •`bundle viz` •`bundle inject` Bundler::SharedHelpers.major_deprecation 2 •Bundler.environment → Bundler.load •Bundler.clean_{env,exec} → Bundler.unbundled_{env,exec} •Bundler.with_clean_env → Bundler.with_unbundled_env
  • 9. Recent Update for RubyGems 3.2 and Bundler 2.2
  • 10. RubyGems/Bundler integration We merged bundler org into rubygems org. The repository, team, maintainers was merged.
  • 11. RubyGems/Bundler integration •We also merged bundler repo into rubygems repo as monorepo. •The commits, CI, mainainers documents was merged Before After
  • 12. Recent Works We still use separated release workflow about RubyGems and Bundler. We try to merge these toolchains at first. •Rubocop Rule 🤖 •Changelog(or History.txt) 📚
  • 13. Bump up RubyGems/Bundler We will merge into RubyGems 3.2 and Bundler 2.2 into Ruby 2.8.0-dev. After that, RubyGems 4.0 will be merge Ruby 3. Ruby Bundler RubyGems 2.7.0 3.0 3.1 2.0 3.0 2.1 3.2 4.0 ? 2.2
  • 15. Standard Libraries Default Gems Bundled Gems Pure Ruby 22 36 6 C extensions 12 17 0 This matrix shows number of standard libraries and their classifications in Ruby 2.7. Gemification for Ruby 2.7
  • 16. Gemification for Ruby 2.8/3.0 Notable Changes •`net-telnet` was removed from the bundled gems •`rexml` and `rss` promoted the bundled gems from the default gems. I’ll work to publish the all of stdlib to the default gems •Except to use `internal.h` or `internal/*.h` and depends on Ruby version •Ex. mkmf.rb, objspace, pty, ripper, socket, coverage
  • 17. Gamification on Ruby 3.0(TBD) We will extract the standard libraries to the default gems. Abbrev Base64 DEBUGGER__ DRb ERB Find OpenURI OptionParser PP PrettyPrinter resolv-replace.rb Resolv Rinda SecureRandom Set Shellwords Time TSort un.rb Digest IO(wait and nonblack) Monitor(Ruby 2.6 version) NKF Pathname Syslog Win32API WIN32OLE
  • 18. Activation issues about the default gems You couldn’t use the specified version of default gems like json when RubyGems/Bundler activated them. When RubyGems uses json-2.1.0, You couldn’t use json 1.8.x. Because ruby gems and rubygems.org never uses JSON format. Because Bundler still use the original implementation for YAMLSerializer.
  • 19. What should we do? 1. Don’t use the default gems in `Bundler.setup`, `Kernel#require` and etc. → 😆 2. Vendoring approach when RubyGems uses only pure ruby libraries like URI. → 😩 3. Rewrite pure ruby code without the default gems. → 😩
  • 20. Rewrite the default gems to Ruby code We should rewrite the URI and FileUtils without the default gems. Ex. Bundler uses FileUtils with the following methods. • FileUtils.mkdir_p • FileUtils.cp_r • FileUtils.rm_rf • FileUtils.touch
  • 21. Gamification on Ruby 3.0(TBD) We should keep the following gems with irb and rubygems. We will extract the default gems to the bundled gems without them. did_you_mean fileutils forwardable io/console reline readline-ext delegate pathname set tsort pathname And also keep the following gems for `bundle exec`. tempfile timeout tmpdir
  • 22. The major problem for the bundled gems If you use Bundler, you need to add the bundled gems into your Gemfile. source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } gem "english" gem “uri” gem “openssl” … I need to consider to transition and migration plan for this. But I have no idea yet. Maybe, I will add the some mechanism to Bundler internal to care about this.
  • 24. Conclusion •Finally, We will start to merge RubyGems and Bundler for unifying the one command. •I’m working to extract stdlib to the default gems in Ruby3 •We should remove the current dependency from rubygems and bundler. Let’s join to #rubygems in ruby-jp slack