From 30a65342e8ee21fb07908309fb76bd994f7ab773 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 17 Jun 2021 11:34:31 +0100 Subject: [PATCH] Deprecate, disable, delete code for Homebrew 3.2.0 Do the usual deprecation, disable, delete dance for Homebrew 3.2.0. --- Library/Homebrew/.rubocop_todo.yml | 1 - Library/Homebrew/cli/named_args.rb | 9 +- Library/Homebrew/cli/parser.rb | 12 -- Library/Homebrew/cmd/search.rb | 9 +- Library/Homebrew/cmd/tap.rb | 12 +- Library/Homebrew/compat/early.rb | 2 - .../compat/early/download_strategy.rb | 46 ------- Library/Homebrew/dev-cmd/man.rb | 9 +- Library/Homebrew/dev-cmd/mirror.rb | 24 ---- Library/Homebrew/dev-cmd/release-notes.rb | 37 ----- Library/Homebrew/extend/ENV/shared.rb | 18 --- .../Homebrew/extend/os/mac/hardware/cpu.rb | 12 +- Library/Homebrew/formula.rb | 29 ++-- Library/Homebrew/formula_assertions.rb | 6 +- Library/Homebrew/hardware.rb | 4 - Library/Homebrew/livecheck/livecheck.rb | 2 +- Library/Homebrew/os/mac/architecture_list.rb | 25 ---- Library/Homebrew/os/mac/mach.rb | 4 +- Library/Homebrew/software_spec.rb | 4 +- Library/Homebrew/test/dev-cmd/bottle_spec.rb | 129 ------------------ Library/Homebrew/test/dev-cmd/man_spec.rb | 8 -- Library/Homebrew/test/dev-cmd/mirror_spec.rb | 8 -- .../test/dev-cmd/release-notes_spec.rb | 8 -- Library/Homebrew/test/os/mac/mach_spec.rb | 20 --- Library/Homebrew/utils.rb | 8 -- Library/Homebrew/utils/github.rb | 6 - 26 files changed, 28 insertions(+), 424 deletions(-) delete mode 100644 Library/Homebrew/compat/early/download_strategy.rb delete mode 100644 Library/Homebrew/dev-cmd/mirror.rb delete mode 100644 Library/Homebrew/dev-cmd/release-notes.rb delete mode 100644 Library/Homebrew/os/mac/architecture_list.rb delete mode 100644 Library/Homebrew/test/dev-cmd/man_spec.rb delete mode 100644 Library/Homebrew/test/dev-cmd/mirror_spec.rb delete mode 100644 Library/Homebrew/test/dev-cmd/release-notes_spec.rb diff --git a/Library/Homebrew/.rubocop_todo.yml b/Library/Homebrew/.rubocop_todo.yml index ad5c59bac7..249ddfbd94 100644 --- a/Library/Homebrew/.rubocop_todo.yml +++ b/Library/Homebrew/.rubocop_todo.yml @@ -12,7 +12,6 @@ Style/Documentation: - "global.rb" - "keg_relocate.rb" - "os/linux/global.rb" - - "os/mac/architecture_list.rb" - "os/mac/global.rb" - "os/mac/keg.rb" - "reinstall.rb" diff --git a/Library/Homebrew/cli/named_args.rb b/Library/Homebrew/cli/named_args.rb index 94c032dec0..f99cea17d7 100644 --- a/Library/Homebrew/cli/named_args.rb +++ b/Library/Homebrew/cli/named_args.rb @@ -100,10 +100,11 @@ module Homebrew resolve_formula(name) when :latest_kegs resolve_latest_keg(name) - when :keg, :default_kegs - # TODO: (3.2) Uncomment the following - # odeprecated "`load_formula_or_cask` with `method: :keg`", - # "`load_formula_or_cask` with `method: :default_kegs`" + when :default_kegs + resolve_default_keg(name) + when :keg + odeprecated "`load_formula_or_cask` with `method: :keg`", + "`load_formula_or_cask` with `method: :default_kegs`" resolve_default_keg(name) when :kegs _, kegs = resolve_kegs(name) diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index 5792b62a28..a4b536d619 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -406,18 +406,6 @@ module Homebrew end end - def max_named(_count) - odisabled "`max_named`", "`named_args max:`" - end - - def min_named(_count_or_type) - odisabled "`min_named`", "`named_args min:`" - end - - def named(_count_or_type) - odisabled "`named`", "`named_args`" - end - sig { void } def hide_from_man_page! @hide_from_man_page = true diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 2d8bafe8bb..4858b60bcb 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -60,8 +60,7 @@ module Homebrew conflicts "--open", "--closed" conflicts(*package_manager_switches) - # TODO: (3.2) Add `min: 1` the `named_args` once `brew search --cask` is removed - named_args :text_or_regex + named_args :text_or_regex, min: 1 end end @@ -74,12 +73,6 @@ module Homebrew return end - if args.no_named? - odisabled "`brew search --cask` with no arguments to output casks", "`brew casks`" if args.cask? - - raise UsageError, "This command requires at least 1 text or regex argument." - end - query = args.named.join(" ") string_or_regex = query_regexp(query) diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 28c4a677ee..f044c18df3 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -56,17 +56,9 @@ module Homebrew elsif args.no_named? puts Tap.names else - if args.full? - opoo "`brew tap --full` is now a no-op!" - # TODO: (3.2) Uncomment the following line and remove the `opoo` above - # odeprecated "`brew tap --full`" - end + odeprecated "`brew tap --full`" if args.full? - if args.shallow? - opoo "`brew tap --shallow` is now a no-op!" - # TODO: (3.2) Uncomment the following line and remove the `opoo` above - # odeprecated "`brew tap --shallow`" - end + odeprecated "`brew tap --shallow`" if args.shallow? tap = Tap.fetch(args.named.first) begin diff --git a/Library/Homebrew/compat/early.rb b/Library/Homebrew/compat/early.rb index 4f0d4338c8..b4806eee61 100644 --- a/Library/Homebrew/compat/early.rb +++ b/Library/Homebrew/compat/early.rb @@ -1,4 +1,2 @@ # typed: strict # frozen_string_literal: true - -require_relative "early/download_strategy" diff --git a/Library/Homebrew/compat/early/download_strategy.rb b/Library/Homebrew/compat/early/download_strategy.rb deleted file mode 100644 index 2df8500f94..0000000000 --- a/Library/Homebrew/compat/early/download_strategy.rb +++ /dev/null @@ -1,46 +0,0 @@ -# typed: false -# frozen_string_literal: true - -class AbstractDownloadStrategy - module CompatFetch - def fetch(timeout: nil) - super() - end - end - - module Compat_Fetch # rubocop:disable Naming/ClassAndModuleCamelCase - def _fetch(*args, **options) - options[:timeout] = nil unless options.key?(:timeout) - - begin - super - rescue ArgumentError => e - raise unless e.message.include?("timeout") - - odeprecated "`def _fetch` in a subclass of `CurlDownloadStrategy`" - options.delete(:timeout) - super(*args, **options) - end - end - end - - class << self - def method_added(method) - if method == :fetch && instance_method(method).arity.zero? - odisabled "`def fetch` in a subclass of `#{self}`", - "`def fetch(timeout: nil, **options)` and output a warning " \ - "when `options` contains new unhandled options" - - class_eval do - prepend CompatFetch - end - elsif method == :_fetch - class_eval do - prepend Compat_Fetch - end - end - - super - end - end -end diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 62655f4d9a..e1a839779a 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -24,13 +24,6 @@ module Homebrew end def man - odeprecated "`brew man`", "`brew generate-man-completions`" - - args = man_args.parse - cmd = ["generate-man-completions"] - cmd << "--fail-if-not-changed" if args.fail_if_not_changed? - - brew_rb = (HOMEBREW_LIBRARY_PATH/"brew.rb").resolved_path - system ENV["HOMEBREW_RUBY_PATH"], brew_rb, *cmd + odisabled "`brew man`", "`brew generate-man-completions`" end end diff --git a/Library/Homebrew/dev-cmd/mirror.rb b/Library/Homebrew/dev-cmd/mirror.rb deleted file mode 100644 index 5764ec7919..0000000000 --- a/Library/Homebrew/dev-cmd/mirror.rb +++ /dev/null @@ -1,24 +0,0 @@ -# typed: true -# frozen_string_literal: true - -require "cli/parser" - -module Homebrew - extend T::Sig - - module_function - - sig { returns(CLI::Parser) } - def mirror_args - Homebrew::CLI::Parser.new do - description <<~EOS - Reupload the stable URL of a formula for use as a mirror. - EOS - hide_from_man_page! - end - end - - def mirror - odisabled "`brew mirror` (Bintray was shut down on 1st May 2021)" - end -end diff --git a/Library/Homebrew/dev-cmd/release-notes.rb b/Library/Homebrew/dev-cmd/release-notes.rb deleted file mode 100644 index b01c857922..0000000000 --- a/Library/Homebrew/dev-cmd/release-notes.rb +++ /dev/null @@ -1,37 +0,0 @@ -# typed: true -# frozen_string_literal: true - -require "cli/parser" -require "release_notes" - -module Homebrew - extend T::Sig - - module_function - - sig { returns(CLI::Parser) } - def release_notes_args - Homebrew::CLI::Parser.new do - usage_banner "`release-notes` [] [] []" - description <<~EOS - Print the merged pull requests on Homebrew/brew between two Git refs. - If no is provided it defaults to the latest tag. - If no is provided it defaults to `origin/master`. - - If `--markdown` and a are passed, an extra line containing - a link to the Homebrew blog will be adding to the output. Additionally, - a warning will be shown if the latest minor release was less than one month ago. - EOS - switch "--markdown", - description: "Print as a Markdown list." - - named_args max: 2 - - hide_from_man_page! - end - end - - def release_notes - odisabled "`brew release-notes`", "`brew release`" - end -end diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 6118c2f4de..64df56acfd 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -238,19 +238,6 @@ module SharedEnvExtension end end - # Snow Leopard defines an NCURSES value the opposite of most distros. - # @see https://bugs.python.org/issue6848 - sig { void } - def ncurses_define - odisabled "ENV.ncurses_define" - end - - # @private - sig { void } - def userpaths! - odisabled "ENV.userpaths!" - end - sig { void } def fortran # Ignore repeated calls to this function as it will misleadingly warn about @@ -328,11 +315,6 @@ module SharedEnvExtension sig { void } def permit_arch_flags; end - sig { void } - def permit_weak_imports - odisabled "ENV.permit_weak_imports" - end - # @private sig { params(cc: T.any(Symbol, String)).returns(T::Boolean) } def compiler_any_clang?(cc = compiler) diff --git a/Library/Homebrew/extend/os/mac/hardware/cpu.rb b/Library/Homebrew/extend/os/mac/hardware/cpu.rb index eafe53a627..64f10ec65c 100644 --- a/Library/Homebrew/extend/os/mac/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/mac/hardware/cpu.rb @@ -6,7 +6,7 @@ require "macho" module Hardware class CPU class << self - undef type, family, universal_archs, features, sse4? + undef type, family, features, sse4? # These methods use info spewed out by sysctl. # Look in for decoding info. @@ -31,16 +31,6 @@ module Hardware end end - # Returns an array that's been extended with {ArchitectureListExtension}, - # which provides helpers like `#as_arch_flags`. - def universal_archs - # Amazingly, this order (64, then 32) matters. It shouldn't, but it - # does. GCC (some versions? some systems?) can blow up if the other - # order is used. - # https://superuser.com/questions/740563/gcc-4-8-on-macos-fails-depending-on-arch-order - [arch_64_bit, arch_32_bit].extend ArchitectureListExtension - end - # True when running under an Intel-based shell via Rosetta 2 on an # Apple Silicon Mac. This can be detected via seeing if there's a # conflict between what `uname` reports and the underlying `sysctl` flags, diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b52826e2c3..a1806c4b24 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2973,22 +2973,18 @@ class Formula @pour_bottle_check.instance_eval(&block) end - # Deprecates a {Formula} (on a given date, if provided) so a warning is + # Deprecates a {Formula} (on the given date) so a warning is # shown on each installation. If the date has not yet passed the formula # will not be deprecated. #
deprecate! date: "2020-08-27", because: :unmaintained
#
deprecate! date: "2020-08-27", because: "has been replaced by foo"
# @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae # @see DeprecateDisable::DEPRECATE_DISABLE_REASONS - def deprecate!(date: nil, because: nil) - odisabled "`deprecate!` without a reason", "`deprecate! because: \"reason\"`" if because.blank? - odisabled "`deprecate!` without a date", "`deprecate! date: \"#{Date.today}\"`" if date.blank? + def deprecate!(date:, because:) + @deprecation_date = Date.parse(date) + return if @deprecation_date > Date.today - @deprecation_date = Date.parse(date) if date.present? - - return if date.present? && Date.parse(date) > Date.today - - @deprecation_reason = because if because.present? + @deprecation_reason = because @deprecated = true end @@ -3012,26 +3008,23 @@ class Formula # @see .deprecate! attr_reader :deprecation_reason - # Disables a {Formula} (on a given date, if provided) so it cannot be + # Disables a {Formula} (on the given date) so it cannot be # installed. If the date has not yet passed the formula # will be deprecated instead of disabled. #
disable! date: "2020-08-27", because: :does_not_build
#
disable! date: "2020-08-27", because: "has been replaced by foo"
# @see https://docs.brew.sh/Deprecating-Disabling-and-Removing-Formulae # @see DeprecateDisable::DEPRECATE_DISABLE_REASONS - def disable!(date: nil, because: nil) - odisabled "`disable!` without a reason", "`disable! because: \"reason\"`" if because.blank? - odisabled "`disable!` without a date", "`disable! date: \"#{Date.today}\"`" if date.blank? + def disable!(date:, because:) + @disable_date = Date.parse(date) - @disable_date = Date.parse(date) if date.present? - - if @disable_date && @disable_date > Date.today - @deprecation_reason = because if because.present? + if @disable_date > Date.today + @deprecation_reason = because @deprecated = true return end - @disable_reason = because if because.present? + @disable_reason = because @disabled = true end diff --git a/Library/Homebrew/formula_assertions.rb b/Library/Homebrew/formula_assertions.rb index c6093ed8b5..7e601ed55e 100644 --- a/Library/Homebrew/formula_assertions.rb +++ b/Library/Homebrew/formula_assertions.rb @@ -42,18 +42,18 @@ module Homebrew assert_not_same: :refute_same, }.each do |old_method, new_method| define_method(old_method) do |*args| - odeprecated old_method, new_method + odisabled old_method, new_method send(new_method, *args) end end def assert_true(act, msg = nil) - odeprecated "assert_true", "assert(...) or assert_equal(true, ...)" + odisabled "assert_true", "assert(...) or assert_equal(true, ...)" assert_equal(true, act, msg) end def assert_false(act, msg = nil) - odeprecated "assert_false", "assert(!...) or assert_equal(false, ...)" + odisabled "assert_false", "assert(!...) or assert_equal(false, ...)" assert_equal(false, act, msg) end diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 83fd45e4f7..52bf2e5e88 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -81,10 +81,6 @@ module Hardware end end - def universal_archs - odisabled "Hardware::CPU.universal_archs" - end - sig { returns(Symbol) } def type case RUBY_PLATFORM diff --git a/Library/Homebrew/livecheck/livecheck.rb b/Library/Homebrew/livecheck/livecheck.rb index 5c2480dc52..a3ade227ad 100644 --- a/Library/Homebrew/livecheck/livecheck.rb +++ b/Library/Homebrew/livecheck/livecheck.rb @@ -533,7 +533,7 @@ module Homebrew rescue ArgumentError => e raise unless e.message.include?("unknown keyword: cask") - odeprecated "`def self.find_versions` in `#{strategy}` without a `cask` parameter" + odisabled "`def self.find_versions` in `#{strategy}` without a `cask` parameter" end match_version_map = strategy_data[:matches] regex = strategy_data[:regex] diff --git a/Library/Homebrew/os/mac/architecture_list.rb b/Library/Homebrew/os/mac/architecture_list.rb deleted file mode 100644 index 1268a7a646..0000000000 --- a/Library/Homebrew/os/mac/architecture_list.rb +++ /dev/null @@ -1,25 +0,0 @@ -# typed: false -# frozen_string_literal: true - -# TODO: (3.2) remove this module when the linked deprecated functions are removed. - -require "hardware" - -module ArchitectureListExtension - # @private - def universal? - intersects_all?(Hardware::CPU::INTEL_32BIT_ARCHS, Hardware::CPU::INTEL_64BIT_ARCHS) - end - - def as_arch_flags - map { |a| "-arch #{a}" }.join(" ") - end - - protected - - def intersects_all?(*set) - set.all? do |archset| - archset.any? { |a| include? a } - end - end -end diff --git a/Library/Homebrew/os/mac/mach.rb b/Library/Homebrew/os/mac/mach.rb index a621afb079..adae8e32f6 100644 --- a/Library/Homebrew/os/mac/mach.rb +++ b/Library/Homebrew/os/mac/mach.rb @@ -2,7 +2,6 @@ # frozen_string_literal: true require "macho" -require "os/mac/architecture_list" # {Pathname} extension for dealing with Mach-O files. # @@ -65,8 +64,7 @@ module MachOShim end def archs - # TODO: (3.2) remove ArchitectureListExtension - mach_data.map { |m| m.fetch :arch }.extend(ArchitectureListExtension) + mach_data.map { |m| m.fetch :arch } end def arch diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 7161c8a036..060632d67f 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -491,7 +491,7 @@ class BottleSpecification def cellar(val = nil) if val.present? - odeprecated( + odisabled( "`cellar` in a bottle block", "`brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument", ) @@ -552,7 +552,7 @@ class BottleSpecification end if digest && tag - odeprecated( + odisabled( '`sha256 "digest" => :tag` in a bottle block', '`brew style --fix` on the formula to update the style or use `sha256 tag: "digest"`', ) diff --git a/Library/Homebrew/test/dev-cmd/bottle_spec.rb b/Library/Homebrew/test/dev-cmd/bottle_spec.rb index d5d0950c40..92949c5f82 100644 --- a/Library/Homebrew/test/dev-cmd/bottle_spec.rb +++ b/Library/Homebrew/test/dev-cmd/bottle_spec.rb @@ -140,70 +140,6 @@ describe "brew bottle" do - # something here - - end - EOS - end - - it "replaces the bottle block in a formula that already has a bottle block in the old format" do - core_tap.path.cd do - system "git", "init" - setup_test_formula "testball", bottle_block: <<~EOS - - bottle do - cellar :any_skip_relocation - sha256 "6b276491297d4052538bd2fd22d5129389f27d90a98f831987236a5b90511b98" => :big_sur - sha256 "c3c650d75f5188f5d6edd351dd3215e141b73b8ec1cf9144f30e39cbc45de72e" => :arm64_big_sur - sha256 "16cf230afdfcb6306c208d169549cf8773c831c8653d2c852315a048960d7e72" => :catalina - end - EOS - system "git", "add", "--all" - system "git", "commit", "-m", "testball 0.1" - end - - expect { - brew "bottle", - "--merge", - "--write", - "#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json" - }.to output(<<~EOS).to_stdout - ==> testball - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - end - EOS - - expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS - class Testball < Formula - desc "Some test" - homepage "https://brew.sh/testball" - url "file://#{tarball}" - sha256 "#{tarball.sha256}" - - option "with-foo", "Build with foo" - - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - end - - def install - (prefix/"foo"/"test").write("test") if build.with? "foo" - prefix.install Dir["*"] - (buildpath/"test.c").write \ - "#include \\nint main(){printf(\\"test\\");return 0;}" - bin.mkpath - system ENV.cc, "test.c", "-o", bin/"test" - end - - - # something here end @@ -267,71 +203,6 @@ describe "brew bottle" do - # something here - - end - EOS - end - - it "updates the bottle block in a formula that already has a bottle block (old format) when using --keep-old" do - core_tap.path.cd do - system "git", "init" - setup_test_formula "testball", bottle_block: <<~EOS - - bottle do - cellar :any - sha256 "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" => :high_sierra - end - EOS - system "git", "add", "--all" - system "git", "commit", "-m", "testball 0.1" - end - - expect { - brew "bottle", - "--merge", - "--write", - "--keep-old", - "#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json", - "#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json" - }.to output(<<~EOS).to_stdout - ==> testball - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - sha256 cellar: :any, high_sierra: "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" - end - EOS - - expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS - class Testball < Formula - desc "Some test" - homepage "https://brew.sh/testball" - url "file://#{tarball}" - sha256 "#{tarball.sha256}" - - option "with-foo", "Build with foo" - - bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149" - sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f" - sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac" - sha256 cellar: :any, high_sierra: "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059" - end - - def install - (prefix/"foo"/"test").write("test") if build.with? "foo" - prefix.install Dir["*"] - (buildpath/"test.c").write \ - "#include \\nint main(){printf(\\"test\\");return 0;}" - bin.mkpath - system ENV.cc, "test.c", "-o", bin/"test" - end - - - # something here end diff --git a/Library/Homebrew/test/dev-cmd/man_spec.rb b/Library/Homebrew/test/dev-cmd/man_spec.rb deleted file mode 100644 index f95903e776..0000000000 --- a/Library/Homebrew/test/dev-cmd/man_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cmd/shared_examples/args_parse" - -describe "brew man" do - it_behaves_like "parseable arguments" -end diff --git a/Library/Homebrew/test/dev-cmd/mirror_spec.rb b/Library/Homebrew/test/dev-cmd/mirror_spec.rb deleted file mode 100644 index ef532d66f4..0000000000 --- a/Library/Homebrew/test/dev-cmd/mirror_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cmd/shared_examples/args_parse" - -describe "brew mirror" do - it_behaves_like "parseable arguments" -end diff --git a/Library/Homebrew/test/dev-cmd/release-notes_spec.rb b/Library/Homebrew/test/dev-cmd/release-notes_spec.rb deleted file mode 100644 index 5e907105fd..0000000000 --- a/Library/Homebrew/test/dev-cmd/release-notes_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -# typed: false -# frozen_string_literal: true - -require "cmd/shared_examples/args_parse" - -describe "brew release-notes" do - it_behaves_like "parseable arguments" -end diff --git a/Library/Homebrew/test/os/mac/mach_spec.rb b/Library/Homebrew/test/os/mac/mach_spec.rb index f9e4102d96..a5c35eef73 100644 --- a/Library/Homebrew/test/os/mac/mach_spec.rb +++ b/Library/Homebrew/test/os/mac/mach_spec.rb @@ -109,26 +109,6 @@ describe "Mach-O" do end end - describe ArchitectureListExtension do - let(:archs) { [:i386, :x86_64, :ppc7400, :ppc64].extend(described_class) } - - specify "universal checks" do - expect(archs).to be_universal - - non_universal = [:i386].extend(described_class) - expect(non_universal).not_to be_universal - - intel_only = [:i386, :x86_64].extend(described_class) - expect(intel_only).to be_universal - end - - specify "architecture flags" do - pn = dylib_path("fat") - expect(pn.archs).to be_universal - expect(pn.archs.as_arch_flags).to eq("-arch x86_64 -arch i386") - end - end - describe "text executables" do let(:pn) { HOMEBREW_PREFIX/"an_executable" } diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index de12d056b2..f6d919ebc2 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -402,14 +402,6 @@ module Kernel end end - # Returns array of architectures that the given command or library is built for. - def archs_for_command(cmd) - odisabled "archs_for_command" - - cmd = which(cmd) unless Pathname.new(cmd).absolute? - Pathname.new(cmd).archs - end - def ignore_interrupts(_opt = nil) # rubocop:disable Style/GlobalVars $ignore_interrupts_nesting_level = 0 unless defined?($ignore_interrupts_nesting_level) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 341a7520b9..300871e517 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -13,12 +13,6 @@ module GitHub module_function - def open_api(url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true) - odisabled "GitHub.open_api", "GitHub::API.open_rest" - API.open_rest(url, data: data, data_binary_path: data_binary_path, request_method: request_method, - scopes: scopes, parse_json: parse_json) - end - def check_runs(repo: nil, commit: nil, pr: nil) if pr repo = pr.fetch("base").fetch("repo").fetch("full_name")