Skip to content

Commit

Permalink
Remove byebug since it doesn't work in tests anymore
Browse files Browse the repository at this point in the history
- Byebug was introduced in [2020](#7577) for hooking into tests for debugging.
- It does not work anymore in so far as it does not stop at breakpoints when following the instructions to trigger them in tests.
  • Loading branch information
issyl0 committed Apr 2, 2024
1 parent f0e442d commit 5c15a62
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 60 deletions.
1 change: 0 additions & 1 deletion Library/Homebrew/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ group :style, optional: true do
gem "rubocop-sorbet", require: false
end
group :tests, optional: true do
gem "byebug", require: false
gem "parallel_tests", require: false
gem "rspec", require: false
gem "rspec-github", require: false
Expand Down
2 changes: 0 additions & 2 deletions Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ GEM
bindata (2.5.0)
bootsnap (1.18.3)
msgpack (~> 1.2)
byebug (11.1.3)
coderay (1.1.3)
commander (4.6.0)
highline (~> 2.0.0)
Expand Down Expand Up @@ -164,7 +163,6 @@ PLATFORMS
DEPENDENCIES
addressable
bootsnap
byebug
json_schemer
kramdown
method_source
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/dev-cmd/tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class Tests < AbstractCommand
switch "--online",
description: "Include tests that use the GitHub API and tests that use any of the taps for " \
"official external commands."
switch "--byebug",
description: "Enable debugging using byebug."
switch "--changed",
description: "Only runs tests on files that were changed from the master branch."
switch "--fail-fast",
Expand All @@ -45,8 +43,6 @@ def run
# Given we might be testing various commands, we probably want everything (except sorbet-static)
Homebrew.install_bundler_gems!(groups: Homebrew.valid_gem_groups - ["sorbet"])

require "byebug" if args.byebug?

HOMEBREW_LIBRARY_PATH.cd do
setup_environment!

Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Library/Homebrew/sorbet/tapioca/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gem:
- json
- msgpack
# These aren't needed:
- byebug
- coderay
- commander
- diff-lcs
Expand Down
1 change: 0 additions & 1 deletion Library/Homebrew/test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
require "rspec/sorbet"
require "rubocop/rspec/support"
require "find"
require "byebug"
require "timeout"

$LOAD_PATH.unshift(File.expand_path("#{ENV.fetch("HOMEBREW_LIBRARY")}/Homebrew/test/support/lib"))
Expand Down
2 changes: 0 additions & 2 deletions Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/msgpack-1.7.2/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/bootsnap-1.18.3")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bootsnap-1.18.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/extensions/arm64-darwin-20/#{Gem.extension_api_version}/byebug-11.1.3")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/byebug-11.1.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/highline-2.0.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/commander-4.6.0/lib")
Expand Down
1 change: 0 additions & 1 deletion completions/bash/brew
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,6 @@ _brew_tests() {
case "${cur}" in
-*)
__brewcomp "
--byebug
--changed
--coverage
--debug
Expand Down
1 change: 0 additions & 1 deletion completions/fish/brew.fish
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,6 @@ __fish_brew_complete_arg 'test' -a '(__fish_brew_suggest_formulae_installed)'


__fish_brew_complete_cmd 'tests' 'Run Homebrew\'s unit and integration tests'
__fish_brew_complete_arg 'tests' -l byebug -d 'Enable debugging using byebug'
__fish_brew_complete_arg 'tests' -l changed -d 'Only runs tests on files that were changed from the master branch'
__fish_brew_complete_arg 'tests' -l coverage -d 'Generate code coverage reports'
__fish_brew_complete_arg 'tests' -l debug -d 'Display any debugging information'
Expand Down
1 change: 0 additions & 1 deletion completions/zsh/_brew
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,6 @@ _brew_test() {
# brew tests
_brew_tests() {
_arguments \
'--byebug[Enable debugging using byebug]' \
'(--only)--changed[Only runs tests on files that were changed from the master branch]' \
'--coverage[Generate code coverage reports]' \
'--debug[Display any debugging information]' \
Expand Down
Loading

0 comments on commit 5c15a62

Please sign in to comment.