diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2795d19d3d..ffd47c945f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -255,9 +255,6 @@ jobs: - name: tests (online) test-flags: --online --coverage runs-on: ubuntu-22.04 - - name: tests (no-compatibility mode) - test-flags: --no-compat --coverage - runs-on: ubuntu-22.04 - name: tests (generic OS) test-flags: --generic --coverage runs-on: ubuntu-22.04 diff --git a/Library/Homebrew/.simplecov b/Library/Homebrew/.simplecov index 039fc2195b..e2bada638c 100755 --- a/Library/Homebrew/.simplecov +++ b/Library/Homebrew/.simplecov @@ -63,7 +63,6 @@ SimpleCov.start do add_filter %r{^/constants.rb$} add_filter %r{^/postinstall.rb$} add_filter %r{^/test.rb$} - add_filter %r{^/compat/} add_filter %r{^/dev-cmd/tests.rb$} add_filter %r{^/test/} add_filter %r{^/vendor/} diff --git a/Library/Homebrew/.yardopts b/Library/Homebrew/.yardopts index b86f778054..ef2b4836c7 100644 --- a/Library/Homebrew/.yardopts +++ b/Library/Homebrew/.yardopts @@ -6,7 +6,6 @@ --template-path yard/templates --exclude test/ --exclude vendor/ ---exclude compat/ extend/os/**/*.rb **/*.rb - diff --git a/Library/Homebrew/compat/cask.rb b/Library/Homebrew/compat/cask.rb deleted file mode 100644 index 8c5121759a..0000000000 --- a/Library/Homebrew/compat/cask.rb +++ /dev/null @@ -1,2 +0,0 @@ -# typed: true -# frozen_string_literal: true diff --git a/Library/Homebrew/compat/early.rb b/Library/Homebrew/compat/early.rb deleted file mode 100644 index b4806eee61..0000000000 --- a/Library/Homebrew/compat/early.rb +++ /dev/null @@ -1,2 +0,0 @@ -# typed: strict -# frozen_string_literal: true diff --git a/Library/Homebrew/compat/formula.rb b/Library/Homebrew/compat/formula.rb deleted file mode 100644 index 8c5121759a..0000000000 --- a/Library/Homebrew/compat/formula.rb +++ /dev/null @@ -1,2 +0,0 @@ -# typed: true -# frozen_string_literal: true diff --git a/Library/Homebrew/compat/late.rb b/Library/Homebrew/compat/late.rb deleted file mode 100644 index 6e36cebe11..0000000000 --- a/Library/Homebrew/compat/late.rb +++ /dev/null @@ -1,5 +0,0 @@ -# typed: strict -# frozen_string_literal: true - -require "compat/formula" -require "compat/cask" diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index e49b62cf6d..af59988836 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -19,8 +19,6 @@ module Homebrew description: "Generate code coverage reports." switch "--generic", description: "Run only OS-agnostic tests." - switch "--no-compat", - description: "Do not load the compatibility layer when running tests." switch "--online", description: "Include tests that use the GitHub API and tests that use any of the taps for " \ "official external commands." @@ -125,7 +123,6 @@ module Homebrew end parallel_rspec_log_name = "parallel_runtime_rspec" - parallel_rspec_log_name = "#{parallel_rspec_log_name}.no_compat" if args.no_compat? parallel_rspec_log_name = "#{parallel_rspec_log_name}.generic" if args.generic? parallel_rspec_log_name = "#{parallel_rspec_log_name}.online" if args.online? parallel_rspec_log_name = "#{parallel_rspec_log_name}.log" @@ -230,7 +227,6 @@ module Homebrew ENV["HOMEBREW_TESTS"] = "1" ENV["HOMEBREW_NO_AUTO_UPDATE"] = "1" ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1" - ENV["HOMEBREW_NO_COMPAT"] = "1" if args.no_compat? ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic? ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online? ENV["HOMEBREW_SORBET_RUNTIME"] = "1" diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb index 375bc1e92d..a4ec38c4e8 100644 --- a/Library/Homebrew/env_config.rb +++ b/Library/Homebrew/env_config.rb @@ -288,10 +288,6 @@ module Homebrew default_text: "`$NO_COLOR`.", boolean: true, }, - HOMEBREW_NO_COMPAT: { - description: "If set, disable all use of legacy compatibility code.", - boolean: true, - }, HOMEBREW_NO_EMOJI: { description: "If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build.", boolean: true, diff --git a/Library/Homebrew/env_config.rbi b/Library/Homebrew/env_config.rbi index 3f664cd315..bf67f9c624 100644 --- a/Library/Homebrew/env_config.rbi +++ b/Library/Homebrew/env_config.rbi @@ -169,9 +169,6 @@ module Homebrew::EnvConfig sig { returns(T::Boolean) } def self.no_color?; end - sig { returns(T::Boolean) } - def self.no_compat?; end - sig { returns(T::Boolean) } def self.no_emoji?; end diff --git a/Library/Homebrew/extend/kernel.rb b/Library/Homebrew/extend/kernel.rb index 635eb9530d..77c7547376 100644 --- a/Library/Homebrew/extend/kernel.rb +++ b/Library/Homebrew/extend/kernel.rb @@ -112,7 +112,6 @@ module Kernel # Try to show the most relevant location in message, i.e. (if applicable): # - Location in a formula. - # - Location outside of 'compat/'. # - Location of caller of deprecated method (if all else fails). backtrace = caller diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 1f87b4c3a9..de6e01e5e4 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -70,7 +70,6 @@ HOMEBREW_PULL_OR_COMMIT_URL_REGEX = HOMEBREW_BOTTLES_EXTNAME_REGEX = /\.([a-z0-9_]+)\.bottle\.(?:(\d+)\.)?tar\.gz$/.freeze require "env_config" -require "compat/early" unless Homebrew::EnvConfig.no_compat? require "macos_versions" require "os" require "messages" @@ -151,5 +150,3 @@ require "utils" require "official_taps" require "tap" require "tap_constants" - -require "compat/late" unless Homebrew::EnvConfig.no_compat? diff --git a/Library/Homebrew/rubocops/extend/formula_cop.rb b/Library/Homebrew/rubocops/extend/formula_cop.rb index 889924c267..38b0b0725d 100644 --- a/Library/Homebrew/rubocops/extend/formula_cop.rb +++ b/Library/Homebrew/rubocops/extend/formula_cop.rb @@ -206,8 +206,7 @@ module RuboCop end def file_path_allowed? - paths_to_exclude = [%r{/Library/Homebrew/compat/}, - %r{/Library/Homebrew/test/}] + paths_to_exclude = [%r{/Library/Homebrew/test/}] return true if @file_path.nil? # file_path is nil when source is directly passed to the cop, e.g. in specs @file_path !~ Regexp.union(paths_to_exclude) diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 1ea10a0493..408e370d7b 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -118,10 +118,6 @@ RSpec.configure do |config| config.include(Test::Helper::MkTmpDir) config.include(Test::Helper::OutputAsTTY) - config.before(:each, :needs_compat) do - skip "Requires the compatibility layer." if ENV["HOMEBREW_NO_COMPAT"] - end - config.before(:each, :needs_linux) do skip "Not running on Linux." unless OS.linux? end diff --git a/completions/bash/brew b/completions/bash/brew index 9ba541ce01..001b443f7b 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -2090,7 +2090,6 @@ _brew_tests() { --debug --generic --help - --no-compat --online --only --quiet diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 9d88c13fab..84691cd721 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -1415,7 +1415,6 @@ __fish_brew_complete_arg 'tests' -l coverage -d 'Generate code coverage reports' __fish_brew_complete_arg 'tests' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'tests' -l generic -d 'Run only OS-agnostic tests' __fish_brew_complete_arg 'tests' -l help -d 'Show this message' -__fish_brew_complete_arg 'tests' -l no-compat -d 'Do not load the compatibility layer when running tests' __fish_brew_complete_arg 'tests' -l online -d 'Include tests that use the GitHub API and tests that use any of the taps for official external commands' __fish_brew_complete_arg 'tests' -l only -d 'Run only test_script`_spec.rb`. Appending `:`line_number will start at a specific line' __fish_brew_complete_arg 'tests' -l quiet -d 'Make some output more quiet' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 6e14cc5711..463753aa62 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -1728,7 +1728,6 @@ _brew_tests() { '--debug[Display any debugging information]' \ '--generic[Run only OS-agnostic tests]' \ '--help[Show this message]' \ - '--no-compat[Do not load the compatibility layer when running tests]' \ '--online[Include tests that use the GitHub API and tests that use any of the taps for official external commands]' \ '(--changed)--only[Run only test_script`_spec.rb`. Appending `:`line_number will start at a specific line]' \ '--quiet[Make some output more quiet]' \ diff --git a/docs/Homebrew-brew-Maintainer-Guide.md b/docs/Homebrew-brew-Maintainer-Guide.md index f5162a094b..d0845a359d 100644 --- a/docs/Homebrew-brew-Maintainer-Guide.md +++ b/docs/Homebrew-brew-Maintainer-Guide.md @@ -46,7 +46,7 @@ There are many checks that run on every PR. The following is a quick list of the - `CI / tap syntax`: This runs `brew style` and `brew audit` on all official taps (note that although this runs on Linux, it does check all cask repos). - `CI / docker`: This builds and deploys a new Homebrew Docker image to GitHub Packages and Docker Hub. - `CI / test everything (macOS)`: This runs several checks on macOS including `brew tests`, `brew update-tests`, `brew test-bot --only-formulae --test-default-formula`, `brew readall` and `brew doctor`. -- `CI / tests (no-compatibility mode)`, `CI / tests (generic OS)` and `CI / tests (Linux)`: These run `brew tests` with various options on Linux. +- `CI / tests (generic OS)` and `CI / tests (Linux)`: These run `brew tests` with various options on Linux. - `Documentation CI / linting` and `rubydoc`: These check the prose and formatting of the written documentation, and verify the [rubydoc API documentation](https://rubydoc.brew.sh) can be built without issue. _Note that this list is non-exhaustive and can change over time._ diff --git a/docs/Manpage.md b/docs/Manpage.md index 45fbf5ad7e..4faed0859f 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1511,8 +1511,6 @@ Run Homebrew's unit and integration tests. Generate code coverage reports. * `--generic`: Run only OS-agnostic tests. -* `--no-compat`: - Do not load the compatibility layer when running tests. * `--online`: Include tests that use the GitHub API and tests that use any of the taps for official external commands. * `--byebug`: @@ -2204,9 +2202,6 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just *Default:* `$NO_COLOR`. -- `HOMEBREW_NO_COMPAT` -
If set, disable all use of legacy compatibility code. - - `HOMEBREW_NO_EMOJI`
If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build. diff --git a/manpages/brew.1 b/manpages/brew.1 index 7bf8f0742e..9a7d2d37b3 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -2165,10 +2165,6 @@ Generate code coverage reports\. Run only OS\-agnostic tests\. . .TP -\fB\-\-no\-compat\fR -Do not load the compatibility layer when running tests\. -. -.TP \fB\-\-online\fR Include tests that use the GitHub API and tests that use any of the taps for official external commands\. . @@ -3234,12 +3230,6 @@ If set, do not print text with colour added\. \fIDefault:\fR \fB$NO_COLOR\fR\. . .TP -\fBHOMEBREW_NO_COMPAT\fR -. -.br -If set, disable all use of legacy compatibility code\. -. -.TP \fBHOMEBREW_NO_EMOJI\fR . .br