The Future of library dependency management of Ruby

Hiroshi SHIBATA
Hiroshi SHIBATAOSS programmer at GMO Pepabo, Inc.
The integration for package ecosystem
Hiroshi SHIBATA / GMO Pepabo, Inc.
2020.01.16 Ginza Rails #10
The Future of library dependency
management of Ruby
self.introduce
Hiroshi SHIBATA @hsbt
https://www.hsbt.org
Executive Officer VP of Engineering
Technical Director
at GMO Pepabo, Inc. @pepabo
No.5
No.2
No.2
What are
RubyGems and Bundler?
1.
8/40min
What’s rubygems?
RubyGems is a package management framework for Ruby.
• rubygems/rubygems.org:
• The Ruby community's gem host.
• rubygems.org is maintain by infrastructure team of rubygems. It is different
team from rubygems cli team.
• rubygems/rubygems:
• Command line tool of rubygems
• Rubygems are created by Seattle.rb
What’s new in RubyGems 3.1
•I released RubyGems 3.1 at 16 Dec 2019
•https://blog.rubygems.org/2019/12/16/3.1.0-released.html
•This version dropped the compatibility code of Ruby 1.8
and 1.9
•Bundle Bundler 2.1
•Multifactor authentication for yank command
What’s Bundler?
•The vendoring tool of Ruby.
•RubyGems couldn’t care dependency of Ruby libraries and
isolate version managing with ruby process.
•Bundler can do them with `Gemfile`
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gemspec
# We need a newish Rake since Active Job sets its test tasks' descriptions.
gem "rake", ">= 11.1"
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
•There is no incompatible feature from Bundler
2.0.x(maybe…)
•Cleanup the compatibility code for Ruby 1.8 and 1.9
•Tuned on the deprecation warnings for Bundler 3
 The Future of library dependency management of Ruby
Merged Bundler into ruby core 😤
Bundler Integration on RubyGems 3.1
• RubyGems always uses Bundler resolver for gem dependencies
• If you used the Ruby 2.5, You can enabled it with only `gem
update —system`
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
require 'rubygems/user_interaction'
Gem::DefaultUserInteraction.use_ui(ui) do
require "bundler"
@gemdeps = Bundler.setup
Bundler.ui = nil
@gemdeps.requested_specs.map(&:to_spec).sort_by(&:name)
end
The current behavior of the bundled bundler
•Bundler has been integrated with
default gems like json, psych.
•The upstream is https://github.com/
bundler/bundler. I backport the
released/developed version to ruby
repository.
benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
bundler (default: 2.1.2)
cgi (default: 0.1.0)
csv (default: 3.1.2)
date (default: 3.0.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
etc (default: 1.1.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
…
The roadmap for Ruby 3
2.
20/40min
Bump up RubyGems/Bundler
•We will merge into RubyGems 3.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
3.0?
4.0
?
RubyGems/Bundler integration
•Now, We put the bundler as
submodule in rubygems
repository.
•We will move the canonical
repository of bundler to
rubygems org or rubygems/
rubygems.
Dependency Resolver incompatible
• RubyGems 2.x and 3.x uses Molinillo-0.5.7
• Bundler 1.x and 2.x also uses Molinillo-0.6.4
• These are different versions and behavior of dependency
resolver.
~/D/g/r/rubygems (master) > ls lib/rubygems/resolver/molinillo/lib/molinillo
delegates dependency_graph.rb gem_metadata.rb resolution.rb state.rb
dependency_graph errors.rb modules resolver.rb
~/D/g/b/bundler (master) > ls lib/bundler/vendor/molinillo/lib/molinillo
compatibility.rb dependency_graph errors.rb modules resolver.rb
delegates dependency_graph.rb gem_metadata.rb resolution.rb state.rb
Make conservative option as default
• We got the installation time when already installed gems.
• To use conservative is ignore re-install action.
~ > gem i rails
Successfully installed rails-5.2.0
1 gem installed
~ > gem i rails ——conservative
~ >
Make `--user-install` as default
• RubyGems 4 will install the all gems to `~/.gem` maybe.
• Pros: Ruby in linux distribution has many of FAQ for gem
installation for using `sudo`. This change resolve this issues.
• Cons: Ruby version manager like rbenv is not support it. And
RubyGems have a lot of issues related this.
Activation issues about 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.
•We can resolve it with `vendoring` approach. But json, psych, and openssl
is C extension library.
The feature flag for Bundler 3
settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? }
settings_flag(:allow_offline_install) { bundler_3_mode? }
settings_flag(:auto_clean_without_path) { bundler_3_mode? }
settings_flag(:auto_config_jobs) { bundler_3_mode? }
settings_flag(:cache_all) { bundler_3_mode? }
settings_flag(:default_install_uses_path) { bundler_3_mode? }
settings_flag(:deployment_means_frozen) { bundler_3_mode? }
settings_flag(:disable_multisource) { bundler_3_mode? }
settings_flag(:forget_cli_options) { bundler_3_mode? }
settings_flag(:global_gem_cache) { bundler_3_mode? }
settings_flag(:only_update_to_newer_versions) { bundler_3_mode? }
settings_flag(:path_relative_to_cwd) { bundler_3_mode? }
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
settings_flag(:print_only_version_number) { bundler_3_mode? }
settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
settings_flag(:skip_default_git_sources) { bundler_3_mode? }
settings_flag(:specific_platform) { bundler_3_mode? }
settings_flag(:suppress_install_using_messages) { bundler_3_mode? }
settings_flag(:unlock_source_unlocks_spec) { !bundler_3_mode? }
settings_flag(:update_requires_all_flag) { bundler_4_mode? }
settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_3_mode? }
settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }
How maintain the OSS with
Daily work
3.
33/40min
I'm NOT
the full-time OSS developer
The detail of hsbt’s OSS work
•My mainly “salary work” is only
top-level management for the
engineering, product and people.
•The management is async work.
So I write the code in waiting to
the result of my management.
•I did contribute 10/day with
code, issue triage and others.
Why do I work with OSS?
•The valuable OUTPUT have a big
influence. So, OSS has a power of
influence rather than closed-
software.
•OSS teach to me the collaborative
mindset. So, OSS is NOT code falling
on the road. You can see the people
throw the OSS.
•OSS is Fun.
How it works with everyday?
Ignore Burnout
•OSS is hard
•“Help! my code is broken after version-up.”, “Error”, “Your code is
slow”…🔥🔥🔥
•But, OSS is easy
•You can ignore the issue yourself and go to the bedroom 🛏
•You don't have a responsibility of resolve it for them. Say “Thank you! I
will work it in the future.” Or “We always welcome your patch!”
Courage for the OSS maintenance
•Close issue or pull-request with not-want feature at first.
•Pull-request says “You should maintain my dirty code in the feature”
•Ignore the suggestion of code-style and trivial changes
•Ex1. Added rubocop rule, Fixed indentation, etc.
•Ex2. Refactor
How do contribute sustainable
•Do not care your pull-request regularly
•When You need to apply your patch with upstream, You can fork it 😁
•Remember the previous slide that is “Courage for the OSS maintenance”
•If you want to merge your pull-request definitely.
•You should write the use-case, expected/actual behavior, coding-style,
benchmark result, commit message every pull-request and everyday.
Survive with the Social Coding
•OSS is not only CODE. It mainly
focus the human being after
GitHub.
•OSS maintainers especially me
consider your being more than your
code.
Ruby is designed to make
programmers happy.
Yukihiro Matz Matsumoto
1 of 33

Recommended

What's new in RubyGems3 by
What's new in RubyGems3What's new in RubyGems3
What's new in RubyGems3Hiroshi SHIBATA
3K views46 slides
OSS Security the hard way by
OSS Security the hard wayOSS Security the hard way
OSS Security the hard wayHiroshi SHIBATA
4.5K views62 slides
The Future of library dependency manageement of Ruby by
The Future of library dependency manageement of RubyThe Future of library dependency manageement of Ruby
The Future of library dependency manageement of RubyHiroshi SHIBATA
988 views55 slides
The Future of Bundled Bundler by
The Future of Bundled BundlerThe Future of Bundled Bundler
The Future of Bundled BundlerHiroshi SHIBATA
4.7K views60 slides
The Future of Dependency Management for Ruby by
The Future of Dependency Management for RubyThe Future of Dependency Management for Ruby
The Future of Dependency Management for RubyHiroshi SHIBATA
7.4K views72 slides
Roadmap for RubyGems 4 and Bundler 3 by
Roadmap for RubyGems 4 and Bundler 3Roadmap for RubyGems 4 and Bundler 3
Roadmap for RubyGems 4 and Bundler 3Hiroshi SHIBATA
794 views23 slides

More Related Content

What's hot

Dependency Resolution with Standard Libraries by
Dependency Resolution with Standard LibrariesDependency Resolution with Standard Libraries
Dependency Resolution with Standard LibrariesHiroshi SHIBATA
803 views24 slides
How to distribute Ruby to the world by
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the worldHiroshi SHIBATA
3.8K views51 slides
RubyGems 3 & 4 by
RubyGems 3 & 4RubyGems 3 & 4
RubyGems 3 & 4Hiroshi SHIBATA
11.5K views64 slides
RubyGems 3 & 4 by
RubyGems 3 & 4RubyGems 3 & 4
RubyGems 3 & 4Hiroshi SHIBATA
1.3K views36 slides
How to distribute Ruby to the world by
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the worldHiroshi SHIBATA
937 views47 slides
Gemification for Ruby 2.5/3.0 by
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Hiroshi SHIBATA
1.3K views50 slides

What's hot(20)

Dependency Resolution with Standard Libraries by Hiroshi SHIBATA
Dependency Resolution with Standard LibrariesDependency Resolution with Standard Libraries
Dependency Resolution with Standard Libraries
Hiroshi SHIBATA803 views
How to distribute Ruby to the world by Hiroshi SHIBATA
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
Hiroshi SHIBATA3.8K views
How to distribute Ruby to the world by Hiroshi SHIBATA
How to distribute Ruby to the worldHow to distribute Ruby to the world
How to distribute Ruby to the world
Hiroshi SHIBATA937 views
Gemification for Ruby 2.5/3.0 by Hiroshi SHIBATA
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
Hiroshi SHIBATA1.3K views
Middleware as Code with mruby by Hiroshi SHIBATA
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
Hiroshi SHIBATA5.2K views
How to develop the Standard Libraries of Ruby? by Hiroshi SHIBATA
How to develop the Standard Libraries of Ruby?How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?
Hiroshi SHIBATA3.6K views
How to Begin to Develop Ruby Core by Hiroshi SHIBATA
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
Hiroshi SHIBATA2.9K views
Large-scaled Deploy Over 100 Servers in 3 Minutes by Hiroshi SHIBATA
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
Hiroshi SHIBATA3.8K views
How to test code with mruby by Hiroshi SHIBATA
How to test code with mrubyHow to test code with mruby
How to test code with mruby
Hiroshi SHIBATA10.1K views
tDiary annual report 2009 - Sapporo Ruby Kaigi02 by Hiroshi SHIBATA
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02
Hiroshi SHIBATA1.5K views
An introduction and future of Ruby coverage library by mametter
An introduction and future of Ruby coverage libraryAn introduction and future of Ruby coverage library
An introduction and future of Ruby coverage library
mametter6.6K views
Middleware as Code with mruby by Hiroshi SHIBATA
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
Hiroshi SHIBATA4.8K views

Similar to The Future of library dependency management of Ruby

The story of language development by
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
11K views45 slides
Exploring Ruby on Rails and PostgreSQL by
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLBarry Jones
3.2K views60 slides
Release responsibly (Maintaining Backwards Compatibility) by
Release responsibly (Maintaining Backwards Compatibility)Release responsibly (Maintaining Backwards Compatibility)
Release responsibly (Maintaining Backwards Compatibility)Emily Stolfo
1.9K views45 slides
Client-Side Packages by
Client-Side PackagesClient-Side Packages
Client-Side PackagesDomenic Denicola
14.2K views37 slides
rsyslog meets docker by
rsyslog meets dockerrsyslog meets docker
rsyslog meets dockerRainer Gerhards
1.5K views33 slides
Using nu get the way you should svcc by
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svccMaarten Balliauw
1.5K views41 slides

Similar to The Future of library dependency management of Ruby(20)

The story of language development by Hiroshi SHIBATA
The story of language developmentThe story of language development
The story of language development
Hiroshi SHIBATA11K views
Exploring Ruby on Rails and PostgreSQL by Barry Jones
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
Barry Jones3.2K views
Release responsibly (Maintaining Backwards Compatibility) by Emily Stolfo
Release responsibly (Maintaining Backwards Compatibility)Release responsibly (Maintaining Backwards Compatibility)
Release responsibly (Maintaining Backwards Compatibility)
Emily Stolfo1.9K views
Using nu get the way you should svcc by Maarten Balliauw
Using nu get the way you should   svccUsing nu get the way you should   svcc
Using nu get the way you should svcc
Maarten Balliauw1.5K views
RubyMotion Inspect Conference - 2013. (With speaker notes.) by alloy020
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
alloy0201.1K views
Packaging perl (LPW2010) by p3castro
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
p3castro2.1K views
Lessons Learnt in 2009 by pratiknaik
Lessons Learnt in 2009Lessons Learnt in 2009
Lessons Learnt in 2009
pratiknaik1.8K views
Angular 2 overview by Jesse Warden
Angular 2 overviewAngular 2 overview
Angular 2 overview
Jesse Warden3.8K views
What would your own version of Ruby look like? by Hung Wu Lo
What would your own version of Ruby look like?What would your own version of Ruby look like?
What would your own version of Ruby look like?
Hung Wu Lo398 views
RubyStack: the easiest way to deploy Ruby on Rails by elliando dias
RubyStack: the easiest way to deploy Ruby on RailsRubyStack: the easiest way to deploy Ruby on Rails
RubyStack: the easiest way to deploy Ruby on Rails
elliando dias489 views
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ... by Gaetano Giunta
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
Gaetano Giunta816 views
Rspec and Capybara Intro Tutorial at RailsConf 2013 by Brian Sam-Bodden
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
Brian Sam-Bodden29.7K views
Tuscany : Applying OSGi After The Fact by Luciano Resende
Tuscany : Applying  OSGi After The FactTuscany : Applying  OSGi After The Fact
Tuscany : Applying OSGi After The Fact
Luciano Resende984 views
Golang @ Tokopedia by Qasim Zaidi
Golang @ TokopediaGolang @ Tokopedia
Golang @ Tokopedia
Qasim Zaidi2.6K views
Webdevcon Keynote hh-2012-09-18 by Pierre Joye
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
Pierre Joye1.4K views
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere by mfrancis
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
mfrancis6.5K views

More from Hiroshi SHIBATA

How resolve Gem dependencies in your code? by
How resolve Gem dependencies in your code?How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?Hiroshi SHIBATA
28 views50 slides
How resolve Gem dependencies in your code? by
How resolve Gem dependencies in your code?How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?Hiroshi SHIBATA
14 views54 slides
Ruby コミッターと歩む Ruby を用いたプロダクト開発 by
Ruby コミッターと歩む Ruby を用いたプロダクト開発Ruby コミッターと歩む Ruby を用いたプロダクト開発
Ruby コミッターと歩む Ruby を用いたプロダクト開発Hiroshi SHIBATA
45 views14 slides
Why ANDPAD commit Ruby and RubyKaigi? by
Why ANDPAD commit Ruby and RubyKaigi?Why ANDPAD commit Ruby and RubyKaigi?
Why ANDPAD commit Ruby and RubyKaigi?Hiroshi SHIBATA
215 views17 slides
RailsGirls から始める エンジニアリングはじめの一歩 by
RailsGirls から始める エンジニアリングはじめの一歩RailsGirls から始める エンジニアリングはじめの一歩
RailsGirls から始める エンジニアリングはじめの一歩Hiroshi SHIBATA
845 views16 slides
The details of CI/CD environment for Ruby by
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for RubyHiroshi SHIBATA
1.1K views39 slides

More from Hiroshi SHIBATA(10)

How resolve Gem dependencies in your code? by Hiroshi SHIBATA
How resolve Gem dependencies in your code?How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?
Hiroshi SHIBATA28 views
How resolve Gem dependencies in your code? by Hiroshi SHIBATA
How resolve Gem dependencies in your code?How resolve Gem dependencies in your code?
How resolve Gem dependencies in your code?
Hiroshi SHIBATA14 views
Ruby コミッターと歩む Ruby を用いたプロダクト開発 by Hiroshi SHIBATA
Ruby コミッターと歩む Ruby を用いたプロダクト開発Ruby コミッターと歩む Ruby を用いたプロダクト開発
Ruby コミッターと歩む Ruby を用いたプロダクト開発
Hiroshi SHIBATA45 views
Why ANDPAD commit Ruby and RubyKaigi? by Hiroshi SHIBATA
Why ANDPAD commit Ruby and RubyKaigi?Why ANDPAD commit Ruby and RubyKaigi?
Why ANDPAD commit Ruby and RubyKaigi?
Hiroshi SHIBATA215 views
RailsGirls から始める エンジニアリングはじめの一歩 by Hiroshi SHIBATA
RailsGirls から始める エンジニアリングはじめの一歩RailsGirls から始める エンジニアリングはじめの一歩
RailsGirls から始める エンジニアリングはじめの一歩
Hiroshi SHIBATA845 views
The details of CI/CD environment for Ruby by Hiroshi SHIBATA
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
Hiroshi SHIBATA1.1K views
Productive Organization with Ruby by Hiroshi SHIBATA
Productive Organization with RubyProductive Organization with Ruby
Productive Organization with Ruby
Hiroshi SHIBATA545 views
The secret of programming language development and future by Hiroshi SHIBATA
The secret of programming  language development and futureThe secret of programming  language development and future
The secret of programming language development and future
Hiroshi SHIBATA1.1K views
Gemification plan of Standard Library on Ruby by Hiroshi SHIBATA
Gemification plan of Standard Library on RubyGemification plan of Standard Library on Ruby
Gemification plan of Standard Library on Ruby
Hiroshi SHIBATA351 views
How to Begin Developing Ruby Core by Hiroshi SHIBATA
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby Core
Hiroshi SHIBATA1.9K views

Recently uploaded

Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
280 views86 slides
MVP and prioritization.pdf by
MVP and prioritization.pdfMVP and prioritization.pdf
MVP and prioritization.pdfrahuldharwal141
31 views8 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
27 views45 slides
SUPPLIER SOURCING.pptx by
SUPPLIER SOURCING.pptxSUPPLIER SOURCING.pptx
SUPPLIER SOURCING.pptxangelicacueva6
16 views1 slide
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
400 views92 slides
Mini-Track: Challenges to Network Automation Adoption by
Mini-Track: Challenges to Network Automation AdoptionMini-Track: Challenges to Network Automation Adoption
Mini-Track: Challenges to Network Automation AdoptionNetwork Automation Forum
13 views27 slides

Recently uploaded(20)

Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software280 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10300 views
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi132 views
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf by Dr. Jimmy Schwarzkopf
STKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdfSTKI Israeli Market Study 2023   corrected forecast 2023_24 v3.pdf
STKI Israeli Market Study 2023 corrected forecast 2023_24 v3.pdf
Serverless computing with Google Cloud (2023-24) by wesley chun
Serverless computing with Google Cloud (2023-24)Serverless computing with Google Cloud (2023-24)
Serverless computing with Google Cloud (2023-24)
wesley chun11 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views

The Future of library dependency management of Ruby

  • 1. The integration for package ecosystem Hiroshi SHIBATA / GMO Pepabo, Inc. 2020.01.16 Ginza Rails #10 The Future of library dependency management of Ruby
  • 3. Hiroshi SHIBATA @hsbt https://www.hsbt.org Executive Officer VP of Engineering Technical Director at GMO Pepabo, Inc. @pepabo
  • 7. What are RubyGems and Bundler? 1. 8/40min
  • 8. What’s rubygems? RubyGems is a package management framework for Ruby. • rubygems/rubygems.org: • The Ruby community's gem host. • rubygems.org is maintain by infrastructure team of rubygems. It is different team from rubygems cli team. • rubygems/rubygems: • Command line tool of rubygems • Rubygems are created by Seattle.rb
  • 9. What’s new in RubyGems 3.1 •I released RubyGems 3.1 at 16 Dec 2019 •https://blog.rubygems.org/2019/12/16/3.1.0-released.html •This version dropped the compatibility code of Ruby 1.8 and 1.9 •Bundle Bundler 2.1 •Multifactor authentication for yank command
  • 10. What’s Bundler? •The vendoring tool of Ruby. •RubyGems couldn’t care dependency of Ruby libraries and isolate version managing with ruby process. •Bundler can do them with `Gemfile` # frozen_string_literal: true source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gemspec # We need a newish Rake since Active Job sets its test tasks' descriptions. gem "rake", ">= 11.1"
  • 11. 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 •There is no incompatible feature from Bundler 2.0.x(maybe…) •Cleanup the compatibility code for Ruby 1.8 and 1.9 •Tuned on the deprecation warnings for Bundler 3
  • 13. Merged Bundler into ruby core 😤
  • 14. Bundler Integration on RubyGems 3.1 • RubyGems always uses Bundler resolver for gem dependencies • If you used the Ruby 2.5, You can enabled it with only `gem update —system` ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path) require 'rubygems/user_interaction' Gem::DefaultUserInteraction.use_ui(ui) do require "bundler" @gemdeps = Bundler.setup Bundler.ui = nil @gemdeps.requested_specs.map(&:to_spec).sort_by(&:name) end
  • 15. The current behavior of the bundled bundler •Bundler has been integrated with default gems like json, psych. •The upstream is https://github.com/ bundler/bundler. I backport the released/developed version to ruby repository. benchmark (default: 0.1.0) bigdecimal (default: 2.0.0) bundler (default: 2.1.2) cgi (default: 0.1.0) csv (default: 3.1.2) date (default: 3.0.0) delegate (default: 0.1.0) did_you_mean (default: 1.4.0) etc (default: 1.1.0) fcntl (default: 1.0.0) fiddle (default: 1.0.0) fileutils (default: 1.4.1) …
  • 16. The roadmap for Ruby 3 2. 20/40min
  • 17. Bump up RubyGems/Bundler •We will merge into RubyGems 3.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 3.0? 4.0 ?
  • 18. RubyGems/Bundler integration •Now, We put the bundler as submodule in rubygems repository. •We will move the canonical repository of bundler to rubygems org or rubygems/ rubygems.
  • 19. Dependency Resolver incompatible • RubyGems 2.x and 3.x uses Molinillo-0.5.7 • Bundler 1.x and 2.x also uses Molinillo-0.6.4 • These are different versions and behavior of dependency resolver. ~/D/g/r/rubygems (master) > ls lib/rubygems/resolver/molinillo/lib/molinillo delegates dependency_graph.rb gem_metadata.rb resolution.rb state.rb dependency_graph errors.rb modules resolver.rb ~/D/g/b/bundler (master) > ls lib/bundler/vendor/molinillo/lib/molinillo compatibility.rb dependency_graph errors.rb modules resolver.rb delegates dependency_graph.rb gem_metadata.rb resolution.rb state.rb
  • 20. Make conservative option as default • We got the installation time when already installed gems. • To use conservative is ignore re-install action. ~ > gem i rails Successfully installed rails-5.2.0 1 gem installed ~ > gem i rails ——conservative ~ >
  • 21. Make `--user-install` as default • RubyGems 4 will install the all gems to `~/.gem` maybe. • Pros: Ruby in linux distribution has many of FAQ for gem installation for using `sudo`. This change resolve this issues. • Cons: Ruby version manager like rbenv is not support it. And RubyGems have a lot of issues related this.
  • 22. Activation issues about 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. •We can resolve it with `vendoring` approach. But json, psych, and openssl is C extension library.
  • 23. The feature flag for Bundler 3 settings_flag(:allow_bundler_dependency_conflicts) { bundler_3_mode? } settings_flag(:allow_offline_install) { bundler_3_mode? } settings_flag(:auto_clean_without_path) { bundler_3_mode? } settings_flag(:auto_config_jobs) { bundler_3_mode? } settings_flag(:cache_all) { bundler_3_mode? } settings_flag(:default_install_uses_path) { bundler_3_mode? } settings_flag(:deployment_means_frozen) { bundler_3_mode? } settings_flag(:disable_multisource) { bundler_3_mode? } settings_flag(:forget_cli_options) { bundler_3_mode? } settings_flag(:global_gem_cache) { bundler_3_mode? } settings_flag(:only_update_to_newer_versions) { bundler_3_mode? } settings_flag(:path_relative_to_cwd) { bundler_3_mode? } settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") } settings_flag(:print_only_version_number) { bundler_3_mode? } settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? } settings_flag(:skip_default_git_sources) { bundler_3_mode? } settings_flag(:specific_platform) { bundler_3_mode? } settings_flag(:suppress_install_using_messages) { bundler_3_mode? } settings_flag(:unlock_source_unlocks_spec) { !bundler_3_mode? } settings_flag(:update_requires_all_flag) { bundler_4_mode? } settings_flag(:use_gem_version_promoter_for_major_updates) { bundler_3_mode? } settings_option(:default_cli_command) { bundler_3_mode? ? :cli_help : :install }
  • 24. How maintain the OSS with Daily work 3. 33/40min
  • 25. I'm NOT the full-time OSS developer
  • 26. The detail of hsbt’s OSS work •My mainly “salary work” is only top-level management for the engineering, product and people. •The management is async work. So I write the code in waiting to the result of my management. •I did contribute 10/day with code, issue triage and others.
  • 27. Why do I work with OSS? •The valuable OUTPUT have a big influence. So, OSS has a power of influence rather than closed- software. •OSS teach to me the collaborative mindset. So, OSS is NOT code falling on the road. You can see the people throw the OSS. •OSS is Fun.
  • 28. How it works with everyday?
  • 29. Ignore Burnout •OSS is hard •“Help! my code is broken after version-up.”, “Error”, “Your code is slow”…🔥🔥🔥 •But, OSS is easy •You can ignore the issue yourself and go to the bedroom 🛏 •You don't have a responsibility of resolve it for them. Say “Thank you! I will work it in the future.” Or “We always welcome your patch!”
  • 30. Courage for the OSS maintenance •Close issue or pull-request with not-want feature at first. •Pull-request says “You should maintain my dirty code in the feature” •Ignore the suggestion of code-style and trivial changes •Ex1. Added rubocop rule, Fixed indentation, etc. •Ex2. Refactor
  • 31. How do contribute sustainable •Do not care your pull-request regularly •When You need to apply your patch with upstream, You can fork it 😁 •Remember the previous slide that is “Courage for the OSS maintenance” •If you want to merge your pull-request definitely. •You should write the use-case, expected/actual behavior, coding-style, benchmark result, commit message every pull-request and everyday.
  • 32. Survive with the Social Coding •OSS is not only CODE. It mainly focus the human being after GitHub. •OSS maintainers especially me consider your being more than your code.
  • 33. Ruby is designed to make programmers happy. Yukihiro Matz Matsumoto