Browse files

Set Pry::Slop equal to Slop (v2.4.4)

We've decided not to upgrade our slop dependency to version 3 for
several reasons:

1. People who are currently using pry in their programs are using slop
version 2; and they may not realise this. Bumping the slop dependency
could therefore break people's code in subtle ways. By removing the
dependency completely we make it obvious that breakage has occurred, and
allows programs to chose their own version of slop.

2. The new version of slop is incompatible with pry. As a command-line
tool we use our option parsing library very very intensely; and as such
we've grown used to (and even embraced) it's warts, inconcistencies and
undocumented behaviours. Upgrading the slop dependency at this point
requires a lot of fix up work both on the slop codebase and the pry

3. The slop API is implicitly part of the pry API for defining custom
commands; by changing that API we run a significant risk of breaking
people's pry extensions.

4. The problems in 1., 2. and 3. are going to recur every time slop releases
a new version.

5. Doing this does not preclude upgrading the version of slop we use in
the future. Beacuse 1. will not occur anymore, the only breakage that we
can cause is in pry extensions; this seems resonable providing we signal
the fact that we're doing it (for example by updating the major
version number).
  • Loading branch information...
1 parent 6967224 commit e306ff5584f7ac098fb87167aadd612d161bc74f @ConradIrwin ConradIrwin committed May 27, 2012
Showing with 1,083 additions and 3 deletions.
  1. +0 −1 Rakefile
  2. +1 −1 lib/pry.rb
  3. +1,081 −0 lib/pry/slop.rb
  4. +1 −1 test/helper.rb
@@ -20,7 +20,6 @@ def apply_spec_defaults(s)
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- test/*`.split("\n")
s.add_dependency('coderay', '~> 1.0.5')
- s.add_dependency('slop', ['>= 2.4.4', '< 3'])
s.add_dependency('method_source','~> 0.7.1')
s.add_development_dependency('bacon', '~> 1.1')
s.add_development_dependency('open4', '~> 1.3')
@@ -172,7 +172,6 @@ module ExtendCommandBundle
require "stringio"
require "coderay"
require "optparse"
-require "slop"
require "rbconfig"
if Pry::Helpers::BaseHelpers.jruby?
@@ -191,6 +190,7 @@ module ExtendCommandBundle
+require "pry/slop"
require "pry/version"
require "pry/rbx_method"
require "pry/rbx_path"
Oops, something went wrong.

0 comments on commit e306ff5

Please sign in to comment.