Slide 1

Slide 1 text

Working towards Bundler 3

Slide 2

Slide 2 text

Colby Swandale @oceanicpanda

Slide 3

Slide 3 text

ɹCore Maintainer ɹRelease Manager

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

# Gemfile source 'https://rubygems.org' gem 'nokogiri' # XML Parser

Slide 9

Slide 9 text

$ bundle install Fetching gem metadata from https://rubygems.org/...... Resolving dependencies... Using bundler 2.0.1 Fetching mini_portile2 2.4.0 Installing mini_portile2 2.4.0 Fetching nokogiri 1.10.2 Installing nokogiri 1.10.2 with native extensions

Slide 10

Slide 10 text

GEM remote: https://rubygems.org/ specs: mini_portile2 (2.4.0) nokogiri (1.10.2) mini_portile2 (~> 2.4.0) PLATFORMS ruby DEPENDENCIES nokogiri BUNDLED WITH 2.0.1

Slide 11

Slide 11 text

# script.rb require "bundler/setup" require "nokogiri" Nokogiri.XML('

Hello World

')

Slide 12

Slide 12 text

It's been a busy year

Slide 13

Slide 13 text

Bundler 1.17

Slide 14

Slide 14 text

Bundler 2

Slide 15

Slide 15 text

Bundler ships with Ruby!

Slide 16

Slide 16 text

Sadly it wasn't all that great

Slide 17

Slide 17 text

Bundler 2 release (The one that broke )

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

It sucked

Slide 22

Slide 22 text

Broke a lot of CI builds

Slide 23

Slide 23 text

Broke default ruby on MacOS

Slide 24

Slide 24 text

Pretty much killed "gem install bundler" on ruby < 2.6

Slide 25

Slide 25 text

Also Pretty much killed "gem install rails" on ruby < 2.6

Slide 26

Slide 26 text

Forced users to run `gem update --system`

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

What happened?

Slide 29

Slide 29 text

Problem 1 gem install bundler

Slide 30

Slide 30 text

$ gem install bundler

Slide 31

Slide 31 text

$ ruby --version ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin18] $ gem install bundler Fetching: bundler-2.0.1.gem (100%) ERROR: Error installing bundler: bundler requires Ruby version >= 2.3.0.

Slide 32

Slide 32 text

$ ruby --version ruby 2.4.6p354 (2019-04-01 revision 67394) [x86_64-darwin18] $ gem --version 2.7.9 $ gem install bundler Fetching: bundler-2.0.0.gem (100%) ERROR: Error installing bundler: There are no versions of bundler (= 2.0.0) compatible with your Ruby & RubyGems bundler requires RubyGems version >= 3.0.0. The current RubyGems version is 2.7.9. Try 'gem update --system' to update RubyGems itself.

Slide 33

Slide 33 text

$ gem install bundler -v '~> 2.0'

Slide 34

Slide 34 text

Problem 2 Version auto switcher

Slide 35

Slide 35 text

$ bundle _1.17.2_ install

Slide 36

Slide 36 text

$ bundle install

Slide 37

Slide 37 text

$ grep -A 1 "BUNDLED WITH" Gemfile.lock BUNDLED WITH 1.17.3 $ bundle version Bundler version 1.17.3

Slide 38

Slide 38 text

$ grep -A 1 "BUNDLED WITH" Gemfile.lock BUNDLED WITH 2.0.1 $ bundle version Bundler version 2.0.1

Slide 39

Slide 39 text

Managed by RubyGems

Slide 40

Slide 40 text

Bundler Version Finder

Slide 41

Slide 41 text

Filters possible versions of Bundler that can be activated by RubyGems

Slide 42

Slide 42 text

RubyGems 3 Matches on major version (Same as Bundler 1) BUNDLED WITH 2.0.1 Bundler Versions 2.0.1 2.0.2 2.1.0 3.0.pre.1 1.17.2

Slide 43

Slide 43 text

Different rules between RubyGems v2 - v3

Slide 44

Slide 44 text

RubyGems 2 Matches on exact version BUNDLED WITH 2.0.1 Bundler Versions 2.0.1 2.0.2 2.1.0 3.0.pre.1 1.17.2

Slide 45

Slide 45 text

Can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException) RubyGems 2 bug

Slide 46

Slide 46 text

This is why Bundler 2.0.0 depended on RubyGems 3

Slide 47

Slide 47 text

BundlerVersionFinder was first written during a very different time and ideas

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

$ gem update --system

Slide 50

Slide 50 text

Why didn't Bundler 2 just read the bundler 1 lockfile?

Slide 51

Slide 51 text

Breaking changes

Slide 52

Slide 52 text

Have bundler manage it's own version

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Problem 3 Communication

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

Discussions were in open channels but were not easily available

Slide 57

Slide 57 text

Move all decisions to Github

Slide 58

Slide 58 text

Improving future releases

Slide 59

Slide 59 text

Ideas for a better major release • Actively engage for feedback from the community • Longer pre release cycles • More transparency around breaking changes

Slide 60

Slide 60 text

Thank you for being patient while we work on fixing these issues

Slide 61

Slide 61 text

I'm sorry for the disruption this caused

Slide 62

Slide 62 text

Bundler is critical to developers and must be treated with care

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

What's coming up in Bundler

Slide 65

Slide 65 text

Official windows support

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

Needs more work

Slide 70

Slide 70 text

We want to have JRuby and TruffleRuby support also

Slide 71

Slide 71 text

Contributors welcome

Slide 72

Slide 72 text

Bundler 2.0.2

Slide 73

Slide 73 text

Bundler 2.1

Slide 74

Slide 74 text

Deprecations

Slide 75

Slide 75 text

$ bundle show rack [DEPRECATED] use `bundle info rack` instead of `bundle show rack` /Users/colby/Desktop/.bundle/ruby/2.6.0/gems/rack-2.0.7

Slide 76

Slide 76 text

Bundle clean git extensions

Slide 77

Slide 77 text

Bundler 3

Slide 78

Slide 78 text

The release where we (intentionally) break stuff

Slide 79

Slide 79 text

Remembering options

Slide 80

Slide 80 text

$ bundle install --path .bundle $ bundle config --parseable path=.bundle

Slide 81

Slide 81 text

$ bundle install --path .bundle $ bundle install --path .bundle $ bundle config path .bundle Or

Slide 82

Slide 82 text

Install options removed from CLI

Slide 83

Slide 83 text

$ bundle install --path $ bundle install --only $ bundle install --without

Slide 84

Slide 84 text

$ bundle config without production

Slide 85

Slide 85 text

bundle default command

Slide 86

Slide 86 text

$ bundle Using rake 12.3.2 Using bundler 2.0.1

Slide 87

Slide 87 text

$ bundler Bundler version 3.0.0 Bundler commands: Primary commands: bundle install [OPTIONS] # Install the current environment to the bundle update [OPTIONS] # Update the current environment bundle cache [OPTIONS] # Locks and then caches all of the gems bundle exec [OPTIONS] # Run the command in context of the bundle config NAME [VALUE] # Retrieve or set a configuration value bundle help [COMMAND] # Describe available commands or one Utilities: bundle add GEM VERSION # Add gem to Gemfile and run bundl bundle binstubs GEM [OPTIONS] # Install the binstubs of the listed bundle check [OPTIONS] # Checks if the dependencies listed bundle doctor [OPTIONS] # Checks the bundle for common -V, [--verbose], [--no-verbose] # Enable verbose output mode

Slide 88

Slide 88 text

Bundle update

Slide 89

Slide 89 text

$ bundler update Fetching gem metadata from https://rubygems.org/... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rack 2.0.3 (was 1.6.8) Installing rack 2.0.3 (was 1.6.8) Removing rack (1.6.8) Bundle updated!

Slide 90

Slide 90 text

$ bundler update To update everything, pass the `--all` flag.

Slide 91

Slide 91 text

bundle show

Slide 92

Slide 92 text

$ bundle show Gems included by the bundle: * bundler (2.0.1) * rake (12.3.2)

Slide 93

Slide 93 text

$ bundle show rake /home/.bundle/ruby/2.6.0/gems/rake-12.3.2

Slide 94

Slide 94 text

bundle info & bundle list

Slide 95

Slide 95 text

$ bundle list Gems included by the bundle: * bundler (2.0.1) * rack (2.0.7)

Slide 96

Slide 96 text

$ bundle info rack * rack (2.0.7) Summary: a modular Ruby webserver interface Homepage: https://rack.github.io/ Path: /home/c/Desktop/.bundle/ruby/2.6.0/gems/rack-2.0.7

Slide 97

Slide 97 text

bundle viz

Slide 98

Slide 98 text

bundle console

Slide 99

Slide 99 text

Coming when it's ready

Slide 100

Slide 100 text

Bundler 3+

Slide 101

Slide 101 text

No content

Slide 102

Slide 102 text

Slide 103

Slide 103 text

No content

Slide 104

Slide 104 text

This will probably be the last Bundler talk

Slide 105

Slide 105 text

@oceanicpanda colby-swandale slack.bundler.io#bundler

Slide 106

Slide 106 text

bundler.io

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

͋Γ͕ͱ͏͍͟͝·͢