From 11c19607296066a0ec11347d6a84de7393a135ae Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 2 Apr 2024 22:49:40 +0100 Subject: [PATCH] Remove `byebug` since it doesn't work in tests anymore - Byebug was introduced in [2020](https://github.com/Homebrew/brew/pull/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. --- Library/Homebrew/Gemfile | 1 - Library/Homebrew/Gemfile.lock | 2 -- Library/Homebrew/dev-cmd/tests.rb | 4 ---- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi | 3 --- Library/Homebrew/sorbet/tapioca/config.yml | 1 - Library/Homebrew/test/spec_helper.rb | 1 - Library/Homebrew/vendor/bundle/bundler/setup.rb | 2 -- completions/bash/brew | 1 - completions/fish/brew.fish | 1 - completions/zsh/_brew | 1 - docs/Manpage.md | 4 ---- manpages/brew.1 | 3 --- 12 files changed, 24 deletions(-) diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index 86fc80f2dd..533593a96f 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -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 diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 04970dc6c7..04018f866b 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -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) @@ -167,7 +166,6 @@ PLATFORMS DEPENDENCIES addressable bootsnap - byebug json_schemer kramdown method_source diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index d3d5e54786..d8c6c62ded 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -21,8 +21,6 @@ module Homebrew 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", @@ -45,8 +43,6 @@ module Homebrew # 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! diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi index 61a59f02ee..821f583831 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/tests.rbi @@ -5,9 +5,6 @@ # Please instead update this file by running `bin/tapioca dsl Homebrew::DevCmd::Tests`. class Homebrew::CLI::Args - sig { returns(T::Boolean) } - def byebug?; end - sig { returns(T::Boolean) } def changed?; end diff --git a/Library/Homebrew/sorbet/tapioca/config.yml b/Library/Homebrew/sorbet/tapioca/config.yml index f94af4c19f..027f3e0ce2 100644 --- a/Library/Homebrew/sorbet/tapioca/config.yml +++ b/Library/Homebrew/sorbet/tapioca/config.yml @@ -6,7 +6,6 @@ gem: - json - msgpack # These aren't needed: - - byebug - coderay - commander - diff-lcs diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 1cf4a428ea..ba08b3bac1 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -29,7 +29,6 @@ require "rspec/retry" 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")) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index fdcc702b08..5a696f1f25 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -35,8 +35,6 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_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") diff --git a/completions/bash/brew b/completions/bash/brew index 318ae832a4..289e52bf87 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -2208,7 +2208,6 @@ _brew_tests() { case "${cur}" in -*) __brewcomp " - --byebug --changed --coverage --debug diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 9167474328..c5ec5801a8 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1465,7 +1465,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' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 65e86cf5b5..69bdbe7c35 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -1815,7 +1815,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]' \ diff --git a/docs/Manpage.md b/docs/Manpage.md index 498b56171e..a001fde3df 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -2650,10 +2650,6 @@ Run Homebrew's unit and integration tests. : Include tests that use the GitHub API and tests that use any of the taps for official external commands. -`--byebug` - -: Enable debugging using byebug. - `--changed` : Only runs tests on files that were changed from the master branch. diff --git a/manpages/brew.1 b/manpages/brew.1 index 270a4f0a6b..9716af71e1 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1687,9 +1687,6 @@ Run only OS\-agnostic tests\. \fB\-\-online\fP Include tests that use the GitHub API and tests that use any of the taps for official external commands\. .TP -\fB\-\-byebug\fP -Enable debugging using byebug\. -.TP \fB\-\-changed\fP Only runs tests on files that were changed from the master branch\. .TP