Skip to content

Commit 89801b2

Browse files
committed
Depend on ruby/debug, replacing Byebug
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. ❤️
1 parent fa1a4b6 commit 89801b2

File tree

16 files changed

+27
-610
lines changed

16 files changed

+27
-610
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Check out https://help.github.com/articles/ignoring-files for how to set that up.
33

44
.Gemfile
5-
.byebug_history
65
.ruby-version
76
/*/doc/
87
/*/test/tmp/

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ group :test do
119119

120120
platforms :mri do
121121
gem "stackprof"
122-
gem "byebug"
122+
gem "debug", ">= 1.0.0.rc", require: false
123123
end
124124

125125
gem "benchmark-ips"

Gemfile.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ GEM
164164
bunny (2.18.0)
165165
amq-protocol (~> 2.3, >= 2.3.1)
166166
sorted_set (~> 1, >= 1.0.2)
167-
byebug (11.1.3)
168167
capybara (3.35.3)
169168
addressable
170169
mini_mime (>= 0.1.3)
@@ -190,6 +189,9 @@ GEM
190189
daemons (1.4.0)
191190
dalli (2.7.11)
192191
dante (0.2.0)
192+
debug (1.0.0.rc2)
193+
irb
194+
reline (>= 0.2.7)
193195
declarative (0.0.20)
194196
delayed_job (4.1.9)
195197
activesupport (>= 3.0, < 6.2)
@@ -290,6 +292,9 @@ GEM
290292
ruby-vips (>= 2.0.17, < 3)
291293
importmap-rails (0.5.1)
292294
rails (>= 6.0.0)
295+
io-console (0.5.9)
296+
irb (1.3.7)
297+
reline (>= 0.2.7)
293298
jmespath (1.4.0)
294299
jsbundling-rails (0.1.0)
295300
rails (>= 6.0.0)
@@ -377,6 +382,8 @@ GEM
377382
redis-namespace (1.8.1)
378383
redis (>= 3.0.4)
379384
regexp_parser (2.1.1)
385+
reline (0.2.7)
386+
io-console (~> 0.5)
380387
representable (3.1.1)
381388
declarative (< 0.1.0)
382389
trailblazer-option (>= 0.1.1, < 0.2.0)
@@ -531,11 +538,11 @@ DEPENDENCIES
531538
benchmark-ips
532539
blade
533540
bootsnap (>= 1.4.4)
534-
byebug
535541
capybara (>= 3.26)
536542
connection_pool
537543
cssbundling-rails
538544
dalli
545+
debug (>= 1.0.0.rc)
539546
delayed_job
540547
delayed_job_active_record
541548
google-cloud-storage (~> 1.11)

actioncable/test/test_helper.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
require "puma"
88
require "rack/mock"
99

10-
begin
11-
require "byebug"
12-
rescue LoadError
13-
end
14-
1510
# Require all the stubs and models
1611
Dir[File.expand_path("stubs/*.rb", __dir__)].each { |file| require file }
1712

actionmailbox/test/test_helper.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
88
require "rails/test_help"
99

10-
require "byebug"
1110
require "webmock/minitest"
1211

1312
require "rails/test_unit/reporter"

activerecord/test/cases/base_prevent_writes_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
require "cases/helper"
44
require "models/bird"
5-
require "byebug"
65

76
class BasePreventWritesTest < ActiveRecord::TestCase
87
if !in_memory_db?

activestorage/test/test_helper.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
require "active_storage/service/mirror_service"
1313
require "image_processing/mini_magick"
1414

15-
begin
16-
require "byebug"
17-
rescue LoadError
18-
end
19-
2015
require "active_job"
2116
ActiveJob::Base.queue_adapter = :test
2217
ActiveJob::Base.logger = ActiveSupport::Logger.new(nil)

0 commit comments

Comments
 (0)