Skip to content

Commit

Permalink
Depend on ruby/debug, replacing Byebug
Browse files Browse the repository at this point in the history
ruby/debug is a new debugger that is going to ship with CRuby.

It makes sense for Rails to switch to this one because that is
where the language is heading, and because Byebug is not fully
compatible with Zeitwerk. See

    deivid-rodriguez/byebug#564

While ruby/debug has not been heavily tested with Zeitwerk,
casual usage seems to suggest it works without issues, including
explicit namespaces, which is where Byebug and Zeitwerk conflict.

Byebug is terrific, thanks a lot for all these years. ❤️
  • Loading branch information
fxn committed Sep 8, 2021
1 parent fa1a4b6 commit 89801b2
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 610 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Check out https://help.github.com/articles/ignoring-files for how to set that up.

.Gemfile
.byebug_history
.ruby-version
/*/doc/
/*/test/tmp/
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ group :test do

platforms :mri do
gem "stackprof"
gem "byebug"
gem "debug", ">= 1.0.0.rc", require: false
end

gem "benchmark-ips"
Expand Down
11 changes: 9 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ GEM
bunny (2.18.0)
amq-protocol (~> 2.3, >= 2.3.1)
sorted_set (~> 1, >= 1.0.2)
byebug (11.1.3)
capybara (3.35.3)
addressable
mini_mime (>= 0.1.3)
Expand All @@ -190,6 +189,9 @@ GEM
daemons (1.4.0)
dalli (2.7.11)
dante (0.2.0)
debug (1.0.0.rc2)
irb
reline (>= 0.2.7)
declarative (0.0.20)
delayed_job (4.1.9)
activesupport (>= 3.0, < 6.2)
Expand Down Expand Up @@ -290,6 +292,9 @@ GEM
ruby-vips (>= 2.0.17, < 3)
importmap-rails (0.5.1)
rails (>= 6.0.0)
io-console (0.5.9)
irb (1.3.7)
reline (>= 0.2.7)
jmespath (1.4.0)
jsbundling-rails (0.1.0)
rails (>= 6.0.0)
Expand Down Expand Up @@ -377,6 +382,8 @@ GEM
redis-namespace (1.8.1)
redis (>= 3.0.4)
regexp_parser (2.1.1)
reline (0.2.7)
io-console (~> 0.5)
representable (3.1.1)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand Down Expand Up @@ -531,11 +538,11 @@ DEPENDENCIES
benchmark-ips
blade
bootsnap (>= 1.4.4)
byebug
capybara (>= 3.26)
connection_pool
cssbundling-rails
dalli
debug (>= 1.0.0.rc)
delayed_job
delayed_job_active_record
google-cloud-storage (~> 1.11)
Expand Down
5 changes: 0 additions & 5 deletions actioncable/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
require "puma"
require "rack/mock"

begin
require "byebug"
rescue LoadError
end

# Require all the stubs and models
Dir[File.expand_path("stubs/*.rb", __dir__)].each { |file| require file }

Expand Down
1 change: 0 additions & 1 deletion actionmailbox/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
require "rails/test_help"

require "byebug"
require "webmock/minitest"

require "rails/test_unit/reporter"
Expand Down
1 change: 0 additions & 1 deletion activerecord/test/cases/base_prevent_writes_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

require "cases/helper"
require "models/bird"
require "byebug"

class BasePreventWritesTest < ActiveRecord::TestCase
if !in_memory_db?
Expand Down
5 changes: 0 additions & 5 deletions activestorage/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
require "active_storage/service/mirror_service"
require "image_processing/mini_magick"

begin
require "byebug"
rescue LoadError
end

require "active_job"
ActiveJob::Base.queue_adapter = :test
ActiveJob::Base.logger = ActiveSupport::Logger.new(nil)
Expand Down

0 comments on commit 89801b2

Please sign in to comment.