language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/cleaner.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true class Cleaner
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/dependency_collector.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class DependencyCollector
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/development_tools.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class DevelopmentTools
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/diagnostic.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "tempfile"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/extend/ENV/shared.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true module SharedEnvExtension
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/extend/ENV/std.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module Stdenv
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/extend/ENV/super.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module Superenv
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/extend/pathname.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require "os/linux/elf"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/formula.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Formula
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/formula_cellar_checks.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true module FormulaCellarChecks
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/hardware/cpu.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module Hardware
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/install.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true module Homebrew
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/keg_relocate.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Keg
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/linkage_checker.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class LinkageChecker
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/readall.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true module Readall
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/requirements/java_requirement.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "language/java"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "requirement"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/resource.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Resource
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/software_spec.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true class BottleSpecification
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/system_config.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true require "formula"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/tap.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class CoreTap < Tap
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/linux/utils/analytics.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true module Utils
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/caveats.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Caveats
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/cleaner.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Cleaner
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/dependency_collector.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class DependencyCollector
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/development_tools.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true require "os/mac/xcode"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module Homebrew
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/extend/ENV/shared.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true module SharedEnvExtension
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/extend/ENV/std.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module Stdenv
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/extend/ENV/super.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module Superenv
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/extend/pathname.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require "os/mac/mach"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/formula.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Formula
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/formula_cellar_checks.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "cache_store"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/formula_support.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true class KegOnlyReason
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/hardware.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true module Hardware
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/hardware/cpu.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "macho"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/keg.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Keg
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Keg
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/language/java.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true module Language
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/missing_formula.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require "cask/cmd/abstract_command"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/requirements/java_requirement.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true class JavaRequirement < Requirement
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "requirement"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/requirements/x11_requirement.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "requirement"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/resource.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Resource
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/search.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require "cask/cask"
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/software_spec.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true class SoftwareSpec
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/system_config.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true module SystemConfig
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb
@@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true module UnpackStrategy
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/utils/analytics.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true module Utils
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/mac/utils/bottles.rb
@@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true module Utils
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/missing_formula.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require "extend/os/mac/missing_formula" if OS.mac?
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/pathname.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true if OS.mac?
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/readall.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require "extend/os/linux/readall" if OS.linux?
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/requirements/java_requirement.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true if OS.mac?
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/requirements/osxfuse_requirement.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true if OS.mac?
true
Other
Homebrew
brew
24ae318a3d5f0519f5fe29d08e01e8a044d99d87.json
Move type annotations into files.
Library/Homebrew/extend/os/requirements/x11_requirement.rb
@@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require "extend/os/mac/requirements/x11_requirement" if OS.mac?
true
Other
Homebrew
brew
9a8f4c7c9645aed3a4141ac537da87eea2f477dc.json
cmd/info: Add support for casks
Library/Homebrew/cli/named_args.rb
@@ -38,6 +38,14 @@ def to_formulae_and_casks(only: nil, method: nil) end end + def to_formulae_casks_unknowns(method: nil) + downcased_unique_named.map do |name| + load_formula_or_cask(name, method: method) + rescue FormulaOrCaskUnavailableError => e + e + end.uniq.freeze + end + def load_formula_or_cask(name, only: nil, method: nil) if only != :cask begin
true
Other
Homebrew
brew
9a8f4c7c9645aed3a4141ac537da87eea2f477dc.json
cmd/info: Add support for casks
Library/Homebrew/cmd/info.rb
@@ -64,63 +64,81 @@ def info_args def info args = info_args.parse - if args.days.present? && !VALID_DAYS.include?(args.days) - raise UsageError, "--days must be one of #{VALID_DAYS.join(", ")}" - end - - if args.category.present? - if args.named.present? && !VALID_FORMULA_CATEGORIES.include?(args.category) - raise UsageError, "--category must be one of #{VALID_FORMULA_CATEGORIES.join(", ")} when querying formulae" + if args.analytics? + if args.days.present? && !VALID_DAYS.include?(args.days) + raise UsageError, "--days must be one of #{VALID_DAYS.join(", ")}" end - unless VALID_CATEGORIES.include?(args.category) - raise UsageError, "--category must be one of #{VALID_CATEGORIES.join(", ")}" + if args.category.present? + if args.named.present? && !VALID_FORMULA_CATEGORIES.include?(args.category) + raise UsageError, "--category must be one of #{VALID_FORMULA_CATEGORIES.join(", ")} when querying formulae" + end + + unless VALID_CATEGORIES.include?(args.category) + raise UsageError, "--category must be one of #{VALID_CATEGORIES.join(", ")}" + end end - end - if args.json + print_analytics(args: args) + elsif args.json raise UsageError, "invalid JSON version: #{args.json}" unless ["v1", true].include? args.json raise FormulaUnspecifiedError if !(args.all? || args.installed?) && args.no_named? print_json(args: args) elsif args.github? - raise FormulaUnspecifiedError if args.no_named? + raise FormulaOrCaskUnspecifiedError if args.no_named? exec_browser(*args.named.to_formulae_and_casks.map { |f| github_info(f) }) else print_info(args: args) end end - def print_info(args:) + def print_analytics(args:) if args.no_named? if args.analytics? Utils::Analytics.output(args: args) elsif HOMEBREW_CELLAR.exist? count = Formula.racks.length puts "#{count} #{"keg".pluralize(count)}, #{HOMEBREW_CELLAR.dup.abv}" end - else - args.named.each_with_index do |f, i| - puts unless i.zero? - begin - formula = Formulary.factory(f) - if args.analytics? - Utils::Analytics.formula_output(formula, args: args) - else - info_formula(formula, args: args) - end - rescue FormulaUnavailableError => e - if args.analytics? - Utils::Analytics.output(filter: f, args: args) - next - end - ofail e.message - # No formula with this name, try a missing formula lookup - if (reason = MissingFormula.reason(f, show_info: true)) - $stderr.puts reason - end + + return + end + + args.named.to_formulae_casks_unknowns.each_with_index do |obj, i| + puts unless i.zero? + + case obj + when Formula + Utils::Analytics.formula_output(obj, args: args) + when Cask::Cask + Utils::Analytics.cask_output(obj, args: args) + when FormulaOrCaskUnavailableError + Utils::Analytics.output(filter: obj.name, args: args) + else + raise + end + end + end + + def print_info(args:) + args.named.to_formulae_casks_unknowns(method: nil).each_with_index do |obj, i| + puts unless i.zero? + + case obj + when Formula + info_formula(obj, args: args) + when Cask::Cask + info_cask(obj, args: args) + when FormulaOrCaskUnavailableError + ofail obj.message + # No formula with this name, try a missing formula lookup + if (reason = MissingFormula.reason(obj.name, show_info: true)) + $stderr.puts reason end + else + raise end end end @@ -274,4 +292,10 @@ def dep_display_s(dep) "#{dep.name} #{dep.option_tags.map { |o| "--#{o}" }.join(" ")}" end + + def info_cask(cask, args:) + require "cask/cmd/info" + + Cask::Cmd::Info.info(cask) + end end
true
Other
Homebrew
brew
117ae2c068e5795b08c15027ed89e7d1ddd004eb.json
Remove redundant check for `sorbet-runtime`.
Library/Homebrew/utils/sorbet.rb
@@ -6,12 +6,5 @@ Homebrew.install_bundler_gems! require "sorbet-runtime" else - begin - gem "sorbet-runtime" - raise "Loaded `sorbet-runtime` instead of `sorbet-runtime-stub`." - rescue Gem::LoadError - nil - end - require "sorbet-runtime-stub" end
false
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/cask/url.rb
@@ -1,8 +1,6 @@ # typed: strict # frozen_string_literal: true -require "utils/sorbet" - # Class corresponding to the `url` stanza. # # @api private
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/dev-cmd/tests.rb
@@ -58,6 +58,7 @@ def tests 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" ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/env_config.rb
@@ -251,6 +251,10 @@ module EnvConfig "of macOS. This is useful in development on new macOS versions.", boolean: true, }, + HOMEBREW_SORBET_RUNTIME: { + description: "Enable runtime typechecking using Sorbet.", + boolean: true, + }, HOMEBREW_SVN: { description: "Use this as the `svn`(1) binary.", default_text: "A Homebrew-built Subversion (if installed), or the system-provided binary.",
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/global.rb
@@ -31,6 +31,8 @@ inflect.irregular "it", "they" end +require "utils/sorbet" + HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ENV["HOMEBREW_BOTTLE_DEFAULT_DOMAIN"] HOMEBREW_BREW_DEFAULT_GIT_REMOTE = ENV["HOMEBREW_BREW_DEFAULT_GIT_REMOTE"] HOMEBREW_CORE_DEFAULT_GIT_REMOTE = ENV["HOMEBREW_CORE_DEFAULT_GIT_REMOTE"]
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/utils.rb
@@ -12,7 +12,6 @@ require "utils/livecheck_formula" require "utils/popen" require "utils/repology" -require "utils/sorbet" require "utils/svn" require "utils/tty" require "tap_constants"
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/utils/sorbet.rb
@@ -1,8 +1,17 @@ # typed: strict # frozen_string_literal: true -if ENV["HOMEBREW_TESTS_COVERAGE"] +if ENV["HOMEBREW_SORBET_RUNTIME"] + require "utils/gems" + Homebrew.install_bundler_gems! require "sorbet-runtime" else - require "utils/sorbet/stubs" + begin + gem "sorbet-runtime" + raise "Loaded `sorbet-runtime` instead of `sorbet-runtime-stub`." + rescue Gem::LoadError + nil + end + + require "sorbet-runtime-stub" end
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
Library/Homebrew/utils/sorbet/stubs.rb
@@ -1,85 +0,0 @@ -# typed: false -# frozen_string_literal: true - -# Stubs for `sorbet-runtime`, all taken from `sorbet/t` except for `T::Sig.sig`. -# -# @private -module T - # rubocop:disable Style/Documentation - module Sig - module WithoutRuntime - def self.sig(arg = nil, &blk); end - end - - module_function - - def sig(arg = nil, &blk); end - end - - def self.any(type_a, type_b, *types); end - - def self.nilable(type); end - - def self.untyped; end - - def self.noreturn; end - - def self.all(type_a, type_b, *types); end - - def self.enum(values); end - - def self.proc; end - - def self.self_type; end - - def self.class_of(klass); end - - def self.type_alias(type = nil, &blk); end - - def self.type_parameter(name); end - - def self.cast(value, _type, checked: true) - value - end - - def self.let(value, _type, checked: true) - value - end - - def self.assert_type!(value, _type, checked: true) - value - end - - def self.unsafe(value) - value - end - - def self.must(arg, _msg = nil) - arg - end - - def self.reveal_type(value) - value - end - - module Array - def self.[](type); end - end - - module Hash - def self.[](keys, values); end - end - - module Enumerable - def self.[](type); end - end - - module Range - def self.[](type); end - end - - module Set - def self.[](type); end - end - # rubocop:enable Style/Documentation -end
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
docs/Manpage.md
@@ -1770,6 +1770,9 @@ For example, you might add something like the following to your ~/.profile, ~/.b * `HOMEBREW_SKIP_OR_LATER_BOTTLES`: If set with `HOMEBREW_DEVELOPER`, do not use bottles from older versions of macOS. This is useful in development on new macOS versions. + * `HOMEBREW_SORBET_RUNTIME`: + Enable runtime typechecking using Sorbet. + * `HOMEBREW_SVN`: Use this as the `svn`(1) binary.
true
Other
Homebrew
brew
d36df370994d1935c185e7b6b56a1836cbc70cd1.json
Replace custom stubs with `sorbet-runtime-stub`.
manpages/brew.1
@@ -2446,6 +2446,10 @@ If set, use Pry for the \fBbrew irb\fR command\. If set with \fBHOMEBREW_DEVELOPER\fR, do not use bottles from older versions of macOS\. This is useful in development on new macOS versions\. . .TP +\fBHOMEBREW_SORBET_RUNTIME\fR +Enable runtime typechecking using Sorbet\. +. +.TP \fBHOMEBREW_SVN\fR Use this as the \fBsvn\fR(1) binary\. .
true
Other
Homebrew
brew
c74d54411b23319f815ea68c74fd5c2351cbb563.json
Add `tc` alias for `typecheck`.
Library/Homebrew/commands.rb
@@ -27,6 +27,7 @@ module Commands "environment" => "--env", "--config" => "config", "-v" => "--version", + "tc" => "typecheck", }.freeze def valid_internal_cmd?(cmd)
true
Other
Homebrew
brew
c74d54411b23319f815ea68c74fd5c2351cbb563.json
Add `tc` alias for `typecheck`.
completions/internal_commands_list.txt
@@ -81,6 +81,7 @@ switch tap tap-info tap-new +tc test tests typecheck
true
Other
Homebrew
brew
bbea2d840d48def854a77d9a392343acbbeff525.json
Run `brew typecheck` without `--quiet` on CI.
.github/workflows/tests.yml
@@ -120,8 +120,7 @@ jobs: - name: Run brew audit --skip-style on all taps run: brew audit --skip-style - # TODO: remove --quiet when possible. - - run: brew typecheck --quiet + - run: brew typecheck - name: Run vale for docs linting run: |
false
Other
Homebrew
brew
ec5eb56a72864dbf4322b9996bcf6b90304d0d62.json
Add stubs for `sorbet-runtime`.
Library/Homebrew/utils.rb
@@ -12,6 +12,7 @@ require "utils/livecheck_formula" require "utils/popen" require "utils/repology" +require "utils/sorbet" require "utils/svn" require "utils/tty" require "tap_constants"
true
Other
Homebrew
brew
ec5eb56a72864dbf4322b9996bcf6b90304d0d62.json
Add stubs for `sorbet-runtime`.
Library/Homebrew/utils/sorbet.rb
@@ -0,0 +1,8 @@ +# typed: strict +# frozen_string_literal: true + +if ENV["HOMEBREW_TESTS_COVERAGE"] + require "sorbet-runtime" +else + require "utils/sorbet/stubs" +end
true
Other
Homebrew
brew
ec5eb56a72864dbf4322b9996bcf6b90304d0d62.json
Add stubs for `sorbet-runtime`.
Library/Homebrew/utils/sorbet/stubs.rb
@@ -0,0 +1,85 @@ +# typed: false +# frozen_string_literal: true + +# Stubs for `sorbet-runtime`, all taken from `sorbet/t` except for `T::Sig.sig`. +# +# @private +module T + # rubocop:disable Style/Documentation + module Sig + module WithoutRuntime + def self.sig(arg = nil, &blk); end + end + + module_function + + def sig(arg = nil, &blk); end + end + + def self.any(type_a, type_b, *types); end + + def self.nilable(type); end + + def self.untyped; end + + def self.noreturn; end + + def self.all(type_a, type_b, *types); end + + def self.enum(values); end + + def self.proc; end + + def self.self_type; end + + def self.class_of(klass); end + + def self.type_alias(type = nil, &blk); end + + def self.type_parameter(name); end + + def self.cast(value, _type, checked: true) + value + end + + def self.let(value, _type, checked: true) + value + end + + def self.assert_type!(value, _type, checked: true) + value + end + + def self.unsafe(value) + value + end + + def self.must(arg, _msg = nil) + arg + end + + def self.reveal_type(value) + value + end + + module Array + def self.[](type); end + end + + module Hash + def self.[](keys, values); end + end + + module Enumerable + def self.[](type); end + end + + module Range + def self.[](type); end + end + + module Set + def self.[](type); end + end + # rubocop:enable Style/Documentation +end
true
Other
Homebrew
brew
b4e8bfe716c787edededeaa3475a78bfdb15ddd6.json
Fix RuboCop offenses.
Library/Homebrew/cask/artifact/abstract_artifact.rb
@@ -45,7 +45,7 @@ def staged_path_join_executable(path) def <=>(other) return unless other.class < AbstractArtifact - return 0 if self.class == other.class + return 0 if instance_of?(other.class) @@sort_order ||= [ # rubocop:disable Style/ClassVars PreflightBlock,
true
Other
Homebrew
brew
b4e8bfe716c787edededeaa3475a78bfdb15ddd6.json
Fix RuboCop offenses.
Library/Homebrew/config.rb
@@ -54,8 +54,7 @@ def get_env_or_raise(env) HOMEBREW_LOGS = Pathname.new(get_env_or_raise("HOMEBREW_LOGS")).expand_path.freeze # Must use `/tmp` instead of `TMPDIR` because long paths break Unix domain sockets -HOMEBREW_TEMP = begin - tmp = Pathname.new(get_env_or_raise("HOMEBREW_TEMP")) +HOMEBREW_TEMP = Pathname.new(get_env_or_raise("HOMEBREW_TEMP")).yield_self do |tmp| tmp.mkpath unless tmp.exist? tmp.realpath end.freeze
true
Other
Homebrew
brew
b4e8bfe716c787edededeaa3475a78bfdb15ddd6.json
Fix RuboCop offenses.
Library/Homebrew/formulary.rb
@@ -218,8 +218,7 @@ def initialize(url) end def load_file(flags:) - if url =~ %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(/Formula)?/([\w+-.@]+).rb} - formula_name = Regexp.last_match(2) + if %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?<formula_name>[\w+-.@]+).rb} =~ url # rubocop:disable Style/CaseLikeIf odisabled "Installation of #{formula_name} from a GitHub commit URL", "'brew extract #{formula_name}' to stable tap on GitHub" elsif url.match?(%r{^(https?|ftp)://}) @@ -232,8 +231,8 @@ def load_file(flags:) curl_download url, to: path super rescue MethodDeprecatedError => e - if url =~ %r{github.com/([\w-]+)/([\w-]+)/} - e.issues_url = "https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/issues/new" + if %r{github.com/(?<user>[\w-]+)/(?<repo>[\w-]+)/} =~ url + e.issues_url = "https://github.com/#{user}/#{repo}/issues/new" end raise end
true
Other
Homebrew
brew
b4e8bfe716c787edededeaa3475a78bfdb15ddd6.json
Fix RuboCop offenses.
Library/Homebrew/rubocops/extend/formula.rb
@@ -395,7 +395,7 @@ def parameters_passed?(method_node, *params) @offense_source_range = method_node.source_range params.all? do |given_param| method_params.any? do |method_param| - if given_param.class == Regexp + if given_param.instance_of?(Regexp) regex_match_group(method_param, given_param) else node_equals?(method_param, given_param)
true
Other
Homebrew
brew
b4e8bfe716c787edededeaa3475a78bfdb15ddd6.json
Fix RuboCop offenses.
Library/Homebrew/rubocops/uses_from_macos.rb
@@ -79,9 +79,9 @@ class UsesFromMacos < FormulaCop def audit_formula(_node, _class_node, _parent_class_node, body_node) find_method_with_args(body_node, :uses_from_macos, /^"(.+)"/).each do |method| - dep = if parameters(method).first.class == RuboCop::AST::StrNode + dep = if parameters(method).first.instance_of?(RuboCop::AST::StrNode) parameters(method).first - elsif parameters(method).first.class == RuboCop::AST::HashNode + elsif parameters(method).first.instance_of?(RuboCop::AST::HashNode) parameters(method).first.keys.first end
true
Other
Homebrew
brew
2bdf3deb6fba75c74e97d84eb9f001f076f4bddb.json
Reduce shallow clone usage GitHub has requested we request our usage of shallow clones. As a result: - do default to shallow clones on CI - do not do --shallow-since when setting up new repositories in `brew update` - do not support shallow clones of homebrew-core at all We may consider in future unshallowing all clones unconditionally.
Library/Homebrew/cmd/tap.rb
@@ -26,7 +26,7 @@ def tap_args EOS switch "--full", description: "Convert a shallow clone to a full clone without untapping. Taps are only cloned as "\ - "shallow clones on continuous integration, or if `--shallow` was originally passed." + "shallow clones if `--shallow` was originally passed." switch "--shallow", description: "Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration." switch "--force-auto-update", @@ -53,8 +53,6 @@ def tap else full_clone = if args.full? true - elsif !args.shallow? - ENV["CI"].blank? else !args.shallow? end
true
Other
Homebrew
brew
2bdf3deb6fba75c74e97d84eb9f001f076f4bddb.json
Reduce shallow clone usage GitHub has requested we request our usage of shallow clones. As a result: - do default to shallow clones on CI - do not do --shallow-since when setting up new repositories in `brew update` - do not support shallow clones of homebrew-core at all We may consider in future unshallowing all clones unconditionally.
Library/Homebrew/cmd/update.sh
@@ -37,8 +37,7 @@ git_init_if_necessary() { fi git config remote.origin.url "$HOMEBREW_BREW_GIT_REMOTE" git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - latest_tag="$(git ls-remote --tags --refs -q origin | tail -n1 | cut -f2)" - git fetch --force origin --shallow-since="$latest_tag" + git fetch --force --tags origin git remote set-head origin --auto >/dev/null git reset --hard origin/master SKIP_FETCH_BREW_REPOSITORY=1 @@ -60,7 +59,7 @@ git_init_if_necessary() { fi git config remote.origin.url "$HOMEBREW_CORE_GIT_REMOTE" git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch --force --depth=1 origin refs/heads/master:refs/remotes/origin/master + git fetch --force origin refs/heads/master:refs/remotes/origin/master git remote set-head origin --auto >/dev/null git reset --hard origin/master SKIP_FETCH_CORE_REPOSITORY=1 @@ -428,12 +427,7 @@ EOS echo "HOMEBREW_BREW_GIT_REMOTE set: using $HOMEBREW_BREW_GIT_REMOTE for Homebrew/brew Git remote." git remote set-url origin "$HOMEBREW_BREW_GIT_REMOTE" git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - latest_tag="$(git ls-remote --tags --refs -q origin | - cut -d/ -f3 | - sort --numeric-sort --field-separator=. --key=1,1 --key=2,2 --key=3,3 | - tail -n1)" - latest_ref="refs/tags/$latest_tag" - git fetch --force origin --shallow-since="$latest_ref" + git fetch --force --tags origin fi if [[ "$HOMEBREW_CORE_DEFAULT_GIT_REMOTE" != "$HOMEBREW_CORE_GIT_REMOTE" ]] && @@ -443,7 +437,7 @@ EOS echo "HOMEBREW_CORE_GIT_REMOTE set: using $HOMEBREW_CORE_GIT_REMOTE for Homebrew/brew Git remote." git remote set-url origin "$HOMEBREW_CORE_GIT_REMOTE" git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch --force --depth=1 origin refs/heads/master:refs/remotes/origin/master + git fetch --force origin refs/heads/master:refs/remotes/origin/master fi safe_cd "$HOMEBREW_REPOSITORY"
true
Other
Homebrew
brew
2bdf3deb6fba75c74e97d84eb9f001f076f4bddb.json
Reduce shallow clone usage GitHub has requested we request our usage of shallow clones. As a result: - do default to shallow clones on CI - do not do --shallow-since when setting up new repositories in `brew update` - do not support shallow clones of homebrew-core at all We may consider in future unshallowing all clones unconditionally.
Library/Homebrew/tap.rb
@@ -620,7 +620,10 @@ def self.ensure_installed! safe_system HOMEBREW_BREW_FILE, "tap", instance.name end + # CoreTap never allows shallow clones (on request from GitHub). def install(full_clone: true, quiet: false, clone_target: nil, force_auto_update: nil) + raise "Shallow clones are not supported for homebrew-core!" unless full_clone + remote = Homebrew::EnvConfig.core_git_remote if remote != default_remote $stderr.puts "HOMEBREW_CORE_GIT_REMOTE set: using #{remote} for Homebrew/core Git remote URL."
true
Other
Homebrew
brew
2bdf3deb6fba75c74e97d84eb9f001f076f4bddb.json
Reduce shallow clone usage GitHub has requested we request our usage of shallow clones. As a result: - do default to shallow clones on CI - do not do --shallow-since when setting up new repositories in `brew update` - do not support shallow clones of homebrew-core at all We may consider in future unshallowing all clones unconditionally.
docs/Manpage.md
@@ -556,7 +556,7 @@ assumptions, so taps can be cloned from places other than GitHub and using protocols other than HTTPS, e.g. SSH, git, HTTP, FTP(S), rsync. * `--full`: - Convert a shallow clone to a full clone without untapping. Taps are only cloned as shallow clones on continuous integration, or if `--shallow` was originally passed. + Convert a shallow clone to a full clone without untapping. Taps are only cloned as shallow clones if `--shallow` was originally passed. * `--shallow`: Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration. * `--force-auto-update`:
true
Other
Homebrew
brew
2bdf3deb6fba75c74e97d84eb9f001f076f4bddb.json
Reduce shallow clone usage GitHub has requested we request our usage of shallow clones. As a result: - do default to shallow clones on CI - do not do --shallow-since when setting up new repositories in `brew update` - do not support shallow clones of homebrew-core at all We may consider in future unshallowing all clones unconditionally.
manpages/brew.1
@@ -786,7 +786,7 @@ With \fIURL\fR specified, tap a formula repository from anywhere, using any tran . .TP \fB\-\-full\fR -Convert a shallow clone to a full clone without untapping\. Taps are only cloned as shallow clones on continuous integration, or if \fB\-\-shallow\fR was originally passed\. +Convert a shallow clone to a full clone without untapping\. Taps are only cloned as shallow clones if \fB\-\-shallow\fR was originally passed\. . .TP \fB\-\-shallow\fR
true
Other
Homebrew
brew
24260e7d82f446976ff63de03cf262eb0df6258b.json
cask/cmd/info: Fix crash when using --github with a formula
Library/Homebrew/cask/cmd/info.rb
@@ -43,15 +43,15 @@ def github_remote_path(remote, path) def run if args.json == "v1" - puts JSON.generate(casks.map(&:to_h)) + puts JSON.generate(args.named.to_casks.map(&:to_h)) elsif args.github? raise CaskUnspecifiedError if args.no_named? - args.named.to_formulae_and_casks.map do |cask| + args.named.to_casks.map do |cask| exec_browser(github_info(cask)) end else - casks.each_with_index do |cask, i| + args.named.to_casks.each_with_index do |cask, i| puts unless i.zero? odebug "Getting info for Cask #{cask}" self.class.info(cask)
false
Other
Homebrew
brew
727d8546217eadf22924ece4100b1bf40c9169c8.json
Add missing variable.
Library/Homebrew/cli/named_args.rb
@@ -60,7 +60,7 @@ def load_formula_or_cask(name, only: nil, method: nil) if only != :formula begin return Cask::CaskLoader.load(name, config: Cask::Config.from_args(@parent)) - rescue Cask::CaskUnavailableError + rescue Cask::CaskUnavailableError => e raise e if only == :cask end end
false
Other
Homebrew
brew
7f14e55f997b70d5ff829b510928f040e59aed05.json
Add missing cask options to `brew upgrade`.
Library/Homebrew/cask/cmd/upgrade.rb
@@ -13,16 +13,25 @@ def self.description "Upgrades all outdated casks or the specified casks." end + OPTIONS = [ + [:switch, "--skip-cask-deps", { + description: "Skip installing cask dependencies.", + }], + [:switch, "--greedy", { + description: "Also include casks with `auto_updates true` or `version :latest`.", + }], + ].freeze + def self.parser super do switch "--force", description: "Force overwriting existing files." - switch "--skip-cask-deps", - description: "Skip installing cask dependencies." - switch "--greedy", - description: "Also include casks which specify `auto_updates true` or `version :latest`." switch "--dry-run", description: "Show what would be upgraded, but do not actually upgrade anything." + + OPTIONS.each do |option| + send(*option) + end end end
true
Other
Homebrew
brew
7f14e55f997b70d5ff829b510928f040e59aed05.json
Add missing cask options to `brew upgrade`.
Library/Homebrew/cmd/upgrade.rb
@@ -12,6 +12,51 @@ module Homebrew module_function def upgrade_args + cask_only_options = [ + [:switch, "--cask", "--casks", { + description: "Treat all named arguments as casks. If no named arguments " \ + "are specified, upgrade only outdated casks.", + }], + *Cask::Cmd::OPTIONS, + *Cask::Cmd::AbstractCommand::OPTIONS, + *Cask::Cmd::Upgrade::OPTIONS, + ] + + formula_only_options = [ + [:switch, "--formula", "--formulae", { + description: "Treat all named arguments as formulae. If no named arguments" \ + "are specified, upgrade only outdated formulae.", + }], + [:switch, "-s", "--build-from-source", { + description: "Compile <formula> from source even if a bottle is available.", + }], + [:switch, "-i", "--interactive", { + description: "Download and patch <formula>, then open a shell. This allows the user to "\ + "run `./configure --help` and otherwise determine how to turn the software "\ + "package into a Homebrew package.", + }], + [:switch, "--force-bottle", { + description: "Install from a bottle if it exists for the current or newest version of "\ + "macOS, even if it would not normally be used for installation.", + }], + [:switch, "--fetch-HEAD", { + description: "Fetch the upstream repository to detect if the HEAD installation of the "\ + "formula is outdated. Otherwise, the repository's HEAD will only be checked for "\ + "updates when a new stable or development version has been released.", + + }], + [:switch, "--ignore-pinned", { + description: "Set a successful exit status even if pinned formulae are not upgraded.", + }], + [:switch, "--keep-tmp", { + description: "Retain the temporary files created during installation.", + }], + [:switch, "--display-times", { + env: :display_install_times, + description: "Print install times for each formula at the end of the run.", + }], + ] + Homebrew::CLI::Parser.new do usage_banner <<~EOS `upgrade` [<options>] [<formula>|<cask>] @@ -26,46 +71,26 @@ def upgrade_args switch "-d", "--debug", description: "If brewing fails, open an interactive debugging session with access to IRB "\ "or a shell inside the temporary build directory." - switch "--formula", - description: "Only upgrade outdated formulae." - switch "--cask", - description: "Only upgrade outdated casks." - switch "-s", "--build-from-source", - description: "Compile <formula> from source even if a bottle is available." - switch "-i", "--interactive", - description: "Download and patch <formula>, then open a shell. This allows the user to "\ - "run `./configure --help` and otherwise determine how to turn the software "\ - "package into a Homebrew package." - switch "--force-bottle", - description: "Install from a bottle if it exists for the current or newest version of "\ - "macOS, even if it would not normally be used for installation." - switch "--fetch-HEAD", - description: "Fetch the upstream repository to detect if the HEAD installation of the "\ - "formula is outdated. Otherwise, the repository's HEAD will only be checked for "\ - "updates when a new stable or development version has been released." - switch "--ignore-pinned", - description: "Set a successful exit status even if pinned formulae are not upgraded." - switch "--keep-tmp", - description: "Retain the temporary files created during installation." switch "-f", "--force", - description: "Install without checking for previously installed keg-only or "\ - "non-migrated versions." + description: "Install formulae without checking for previously installed keg-only or "\ + "non-migrated versions. Overwrite existing files when installing casks." switch "-v", "--verbose", description: "Print the verification and postinstall steps." - switch "--display-times", - env: :display_install_times, - description: "Print install times for each formula at the end of the run." switch "-n", "--dry-run", description: "Show what would be upgraded, but do not actually upgrade anything." - switch "--greedy", - description: "Upgrade casks with `auto_updates` or `version :latest`" + conflicts "--build-from-source", "--force-bottle" - conflicts "--formula", "--greedy" - ["--formula", "-s", "--build-from-source", "-i", "--interactive", - "--force-bottle", "--fetch-HEAD", "--ignore-pinned", "--keep-tmp", - "--display-times"].each do |flag| - conflicts "--cask", flag + + formula_only_options.each do |options| + send(*options) + conflicts "--cask", options[-2] end + + cask_only_options.each do |options| + send(*options) + conflicts "--formula", options[-2] + end + formula_options end end
true
Other
Homebrew
brew
7f14e55f997b70d5ff829b510928f040e59aed05.json
Add missing cask options to `brew upgrade`.
docs/Manpage.md
@@ -534,6 +534,12 @@ reinstalled formulae or, every 30 days, for all formulae. * `-d`, `--debug`: If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory. +* `-f`, `--force`: + Install without checking for previously installed keg-only or non-migrated versions. +* `-v`, `--verbose`: + Print the verification and postinstall steps. +* `--formula`: + Treat all named arguments as formulae. * `-s`, `--build-from-source`: Compile *`formula`* from source even if a bottle is available. * `-i`, `--interactive`: @@ -542,12 +548,46 @@ reinstalled formulae or, every 30 days, for all formulae. Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation. * `--keep-tmp`: Retain the temporary files created during installation. -* `-f`, `--force`: - Install without checking for previously installed keg-only or non-migrated versions. -* `-v`, `--verbose`: - Print the verification and postinstall steps. * `--display-times`: Print install times for each formula at the end of the run. +* `--cask`: + Treat all named arguments as casks. +* `--appdir`: + Target location for Applications. Default: `/Applications` +* `--colorpickerdir`: + Target location for Color Pickers. Default: `~/Library/ColorPickers` +* `--prefpanedir`: + Target location for Preference Panes. Default: `~/Library/PreferencePanes` +* `--qlplugindir`: + Target location for QuickLook Plugins. Default: `~/Library/QuickLook` +* `--mdimporterdir`: + Target location for Spotlight Plugins. Default: `~/Library/Spotlight` +* `--dictionarydir`: + Target location for Dictionaries. Default: `~/Library/Dictionaries` +* `--fontdir`: + Target location for Fonts. Default: `~/Library/Fonts` +* `--servicedir`: + Target location for Services. Default: `~/Library/Services` +* `--input_methoddir`: + Target location for Input Methods. Default: `~/Library/Input Methods` +* `--internet_plugindir`: + Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` +* `--audio_unit_plugindir`: + Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` +* `--vst_plugindir`: + Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` +* `--vst3_plugindir`: + Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` +* `--screen_saverdir`: + Target location for Screen Savers. Default: `~/Library/Screen Savers` +* `--language`: + Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` +* `--[no-]binaries`: + Disable/enable linking of helper executables. Default: enabled +* `--require-sha`: + Require all casks to have a checksum. +* `--[no-]quarantine`: + Disable/enable quarantining of downloads. Default: enabled ### `search` [*`options`*] [*`text`*|`/`*`text`*`/`] @@ -681,10 +721,14 @@ upgraded formulae or, every 30 days, for all formulae. * `-d`, `--debug`: If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory. +* `-f`, `--force`: + Install formulae without checking for previously installed keg-only or non-migrated versions. Overwrite existing files when installing casks. +* `-v`, `--verbose`: + Print the verification and postinstall steps. +* `-n`, `--dry-run`: + Show what would be upgraded, but do not actually upgrade anything. * `--formula`: - Only upgrade outdated formulae. -* `--cask`: - Only upgrade outdated casks. + Treat all named arguments as formulae. If no named argumentsare specified, upgrade only outdated formulae. * `-s`, `--build-from-source`: Compile *`formula`* from source even if a bottle is available. * `-i`, `--interactive`: @@ -697,16 +741,50 @@ upgraded formulae or, every 30 days, for all formulae. Set a successful exit status even if pinned formulae are not upgraded. * `--keep-tmp`: Retain the temporary files created during installation. -* `-f`, `--force`: - Install without checking for previously installed keg-only or non-migrated versions. -* `-v`, `--verbose`: - Print the verification and postinstall steps. * `--display-times`: Print install times for each formula at the end of the run. -* `-n`, `--dry-run`: - Show what would be upgraded, but do not actually upgrade anything. +* `--cask`: + Treat all named arguments as casks. If no named arguments are specified, upgrade only outdated casks. +* `--appdir`: + Target location for Applications. Default: `/Applications` +* `--colorpickerdir`: + Target location for Color Pickers. Default: `~/Library/ColorPickers` +* `--prefpanedir`: + Target location for Preference Panes. Default: `~/Library/PreferencePanes` +* `--qlplugindir`: + Target location for QuickLook Plugins. Default: `~/Library/QuickLook` +* `--mdimporterdir`: + Target location for Spotlight Plugins. Default: `~/Library/Spotlight` +* `--dictionarydir`: + Target location for Dictionaries. Default: `~/Library/Dictionaries` +* `--fontdir`: + Target location for Fonts. Default: `~/Library/Fonts` +* `--servicedir`: + Target location for Services. Default: `~/Library/Services` +* `--input_methoddir`: + Target location for Input Methods. Default: `~/Library/Input Methods` +* `--internet_plugindir`: + Target location for Internet Plugins. Default: `~/Library/Internet Plug-Ins` +* `--audio_unit_plugindir`: + Target location for Audio Unit Plugins. Default: `~/Library/Audio/Plug-Ins/Components` +* `--vst_plugindir`: + Target location for VST Plugins. Default: `~/Library/Audio/Plug-Ins/VST` +* `--vst3_plugindir`: + Target location for VST3 Plugins. Default: `~/Library/Audio/Plug-Ins/VST3` +* `--screen_saverdir`: + Target location for Screen Savers. Default: `~/Library/Screen Savers` +* `--language`: + Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the `language of your system` +* `--[no-]binaries`: + Disable/enable linking of helper executables. Default: enabled +* `--require-sha`: + Require all casks to have a checksum. +* `--[no-]quarantine`: + Disable/enable quarantining of downloads. Default: enabled +* `--skip-cask-deps`: + Skip installing cask dependencies. * `--greedy`: - Upgrade casks with `auto_updates` or `version :latest` + Also include casks with `auto_updates true` or `version :latest`. ### `uses` [*`options`*] *`formula`*
true
Other
Homebrew
brew
7f14e55f997b70d5ff829b510928f040e59aed05.json
Add missing cask options to `brew upgrade`.
manpages/brew.1
@@ -790,6 +790,18 @@ Unless \fBHOMEBREW_NO_INSTALL_CLEANUP\fR is set, \fBbrew cleanup\fR will then be If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\. . .TP +\fB\-f\fR, \fB\-\-force\fR +Install without checking for previously installed keg\-only or non\-migrated versions\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Print the verification and postinstall steps\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP \fB\-s\fR, \fB\-\-build\-from\-source\fR Compile \fIformula\fR from source even if a bottle is available\. . @@ -806,16 +818,84 @@ Install from a bottle if it exists for the current or newest version of macOS, e Retain the temporary files created during installation\. . .TP -\fB\-f\fR, \fB\-\-force\fR -Install without checking for previously installed keg\-only or non\-migrated versions\. +\fB\-\-display\-times\fR +Print install times for each formula at the end of the run\. . .TP -\fB\-v\fR, \fB\-\-verbose\fR -Print the verification and postinstall steps\. +\fB\-\-cask\fR +Treat all named arguments as casks\. . .TP -\fB\-\-display\-times\fR -Print install times for each formula at the end of the run\. +\fB\-\-appdir\fR +Target location for Applications\. Default: \fB/Applications\fR +. +.TP +\fB\-\-colorpickerdir\fR +Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR +. +.TP +\fB\-\-prefpanedir\fR +Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR +. +.TP +\fB\-\-qlplugindir\fR +Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR +. +.TP +\fB\-\-mdimporterdir\fR +Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR +. +.TP +\fB\-\-dictionarydir\fR +Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR +. +.TP +\fB\-\-fontdir\fR +Target location for Fonts\. Default: \fB~/Library/Fonts\fR +. +.TP +\fB\-\-servicedir\fR +Target location for Services\. Default: \fB~/Library/Services\fR +. +.TP +\fB\-\-input_methoddir\fR +Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR +. +.TP +\fB\-\-internet_plugindir\fR +Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR +. +.TP +\fB\-\-audio_unit_plugindir\fR +Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR +. +.TP +\fB\-\-vst_plugindir\fR +Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR +. +.TP +\fB\-\-vst3_plugindir\fR +Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR +. +.TP +\fB\-\-screen_saverdir\fR +Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR +. +.TP +\fB\-\-language\fR +Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR +. +.TP +\fB\-\-[no\-]binaries\fR +Disable/enable linking of helper executables\. Default: enabled +. +.TP +\fB\-\-require\-sha\fR +Require all casks to have a checksum\. +. +.TP +\fB\-\-[no\-]quarantine\fR +Disable/enable quarantining of downloads\. Default: enabled . .SS "\fBsearch\fR [\fIoptions\fR] [\fItext\fR|\fB/\fR\fItext\fR\fB/\fR]" Perform a substring search of cask tokens and formula names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. The search for \fItext\fR is extended online to \fBhomebrew/core\fR and \fBhomebrew/cask\fR\. @@ -970,12 +1050,20 @@ Unless \fBHOMEBREW_NO_INSTALL_CLEANUP\fR is set, \fBbrew cleanup\fR will then be If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\. . .TP -\fB\-\-formula\fR -Only upgrade outdated formulae\. +\fB\-f\fR, \fB\-\-force\fR +Install formulae without checking for previously installed keg\-only or non\-migrated versions\. Overwrite existing files when installing casks\. . .TP -\fB\-\-cask\fR -Only upgrade outdated casks\. +\fB\-v\fR, \fB\-\-verbose\fR +Print the verification and postinstall steps\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Show what would be upgraded, but do not actually upgrade anything\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. If no named argumentsare specified, upgrade only outdated formulae\. . .TP \fB\-s\fR, \fB\-\-build\-from\-source\fR @@ -1002,24 +1090,92 @@ Set a successful exit status even if pinned formulae are not upgraded\. Retain the temporary files created during installation\. . .TP -\fB\-f\fR, \fB\-\-force\fR -Install without checking for previously installed keg\-only or non\-migrated versions\. +\fB\-\-display\-times\fR +Print install times for each formula at the end of the run\. . .TP -\fB\-v\fR, \fB\-\-verbose\fR -Print the verification and postinstall steps\. +\fB\-\-cask\fR +Treat all named arguments as casks\. If no named arguments are specified, upgrade only outdated casks\. . .TP -\fB\-\-display\-times\fR -Print install times for each formula at the end of the run\. +\fB\-\-appdir\fR +Target location for Applications\. Default: \fB/Applications\fR . .TP -\fB\-n\fR, \fB\-\-dry\-run\fR -Show what would be upgraded, but do not actually upgrade anything\. +\fB\-\-colorpickerdir\fR +Target location for Color Pickers\. Default: \fB~/Library/ColorPickers\fR +. +.TP +\fB\-\-prefpanedir\fR +Target location for Preference Panes\. Default: \fB~/Library/PreferencePanes\fR +. +.TP +\fB\-\-qlplugindir\fR +Target location for QuickLook Plugins\. Default: \fB~/Library/QuickLook\fR +. +.TP +\fB\-\-mdimporterdir\fR +Target location for Spotlight Plugins\. Default: \fB~/Library/Spotlight\fR +. +.TP +\fB\-\-dictionarydir\fR +Target location for Dictionaries\. Default: \fB~/Library/Dictionaries\fR +. +.TP +\fB\-\-fontdir\fR +Target location for Fonts\. Default: \fB~/Library/Fonts\fR +. +.TP +\fB\-\-servicedir\fR +Target location for Services\. Default: \fB~/Library/Services\fR +. +.TP +\fB\-\-input_methoddir\fR +Target location for Input Methods\. Default: \fB~/Library/Input Methods\fR +. +.TP +\fB\-\-internet_plugindir\fR +Target location for Internet Plugins\. Default: \fB~/Library/Internet Plug\-Ins\fR +. +.TP +\fB\-\-audio_unit_plugindir\fR +Target location for Audio Unit Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/Components\fR +. +.TP +\fB\-\-vst_plugindir\fR +Target location for VST Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST\fR +. +.TP +\fB\-\-vst3_plugindir\fR +Target location for VST3 Plugins\. Default: \fB~/Library/Audio/Plug\-Ins/VST3\fR +. +.TP +\fB\-\-screen_saverdir\fR +Target location for Screen Savers\. Default: \fB~/Library/Screen Savers\fR +. +.TP +\fB\-\-language\fR +Set language of the Cask to install\. The first matching language is used, otherwise the default language on the Cask\. The default value is the \fBlanguage of your system\fR +. +.TP +\fB\-\-[no\-]binaries\fR +Disable/enable linking of helper executables\. Default: enabled +. +.TP +\fB\-\-require\-sha\fR +Require all casks to have a checksum\. +. +.TP +\fB\-\-[no\-]quarantine\fR +Disable/enable quarantining of downloads\. Default: enabled +. +.TP +\fB\-\-skip\-cask\-deps\fR +Skip installing cask dependencies\. . .TP \fB\-\-greedy\fR -Upgrade casks with \fBauto_updates\fR or \fBversion :latest\fR +Also include casks with \fBauto_updates true\fR or \fBversion :latest\fR\. . .SS "\fBuses\fR [\fIoptions\fR] \fIformula\fR" Show formulae that specify \fIformula\fR as a dependency (i\.e\. show dependents of \fIformula\fR)\. When given multiple formula arguments, show the intersection of formulae that use \fIformula\fR\. By default, \fBuses\fR shows all formulae that specify \fIformula\fR as a required or recommended dependency for their stable builds\.
true
Other
Homebrew
brew
e40eece17bdf83b6d93fc8fff36f94938db22cd3.json
Add cask options to `brew reinstall`.
Library/Homebrew/cli/named_args.rb
@@ -23,21 +23,33 @@ def initialize(*args, parent: Args.new, override_spec: nil, force_bottle: false, super(@args) end + def to_casks + @to_casks ||= to_formulae_and_casks(only: :cask).freeze + end + def to_formulae @to_formulae ||= to_formulae_and_casks(only: :formula).freeze end - def to_formulae_and_casks(only: nil) + def to_formulae_and_casks(only: nil, method: nil) @to_formulae_and_casks ||= {} @to_formulae_and_casks[only] ||= begin - to_objects(only: only).reject { |o| o.is_a?(Tap) }.freeze + to_objects(only: only, method: method).reject { |o| o.is_a?(Tap) }.freeze end end - def load_formula_or_cask(name, only: nil) + def load_formula_or_cask(name, only: nil, method: nil) if only != :cask begin - formula = Formulary.factory(name, spec, force_bottle: @force_bottle, flags: @flags) + formula = case method + when nil, :factory + Formulary.factory(name, *spec, force_bottle: @force_bottle, flags: @flags) + when :resolve + Formulary.resolve(name, spec: spec, force_bottle: @force_bottle, flags: @flags) + else + raise + end + warn_if_cask_conflicts(name, "formula") unless only == :formula return formula rescue FormulaUnavailableError => e @@ -47,7 +59,7 @@ def load_formula_or_cask(name, only: nil) if only != :formula begin - return Cask::CaskLoader.load(name) + return Cask::CaskLoader.load(name, config: Cask::Config.from_args(@parent)) rescue Cask::CaskUnavailableError raise e if only == :cask end @@ -58,46 +70,30 @@ def load_formula_or_cask(name, only: nil) private :load_formula_or_cask def resolve_formula(name) - Formulary.resolve(name, spec: spec(nil), force_bottle: @force_bottle, flags: @flags) + Formulary.resolve(name, spec: spec, force_bottle: @force_bottle, flags: @flags) end private :resolve_formula def to_resolved_formulae - @to_resolved_formulae ||= (downcased_unique_named - homebrew_tap_cask_names).map do |name| - resolve_formula(name) - end.uniq(&:name).freeze + @to_resolved_formulae ||= to_formulae_and_casks(only: :formula, method: :resolve) + .freeze end def to_resolved_formulae_to_casks - @to_resolved_formulae_to_casks ||= begin - resolved_formulae = [] - casks = [] - - downcased_unique_named.each do |name| - resolved_formulae << resolve_formula(name) - - warn_if_cask_conflicts(name, "formula") - rescue FormulaUnavailableError - begin - casks << Cask::CaskLoader.load(name) - rescue Cask::CaskUnavailableError - raise "No available formula or cask with the name \"#{name}\"" - end - end - - [resolved_formulae.freeze, casks.freeze].freeze - end + @to_resolved_formulae_to_casks ||= to_formulae_and_casks(method: :resolve) + .partition { |o| o.is_a?(Formula) } + .map(&:freeze).freeze end # Convert named arguments to `Tap`, `Formula` or `Cask` objects. # If both a formula and cask exist with the same name, returns the # formula and prints a warning unless `only` is specified. - def to_objects(only: nil) + def to_objects(only: nil, method: nil) @to_objects ||= {} @to_objects[only] ||= downcased_unique_named.flat_map do |name| next Tap.fetch(name) if only == :tap || (only.nil? && name.count("/") == 1 && !name.start_with?("./", "/")) - load_formula_or_cask(name, only: only) + load_formula_or_cask(name, only: only, method: method) end.uniq.freeze end @@ -132,12 +128,6 @@ def to_paths(only: nil) end.uniq.freeze end - def to_casks - @to_casks ||= downcased_unique_named - .map { |name| Cask::CaskLoader.load(name, config: Cask::Config.from_args(@parent)) } - .freeze - end - def to_kegs @to_kegs ||= downcased_unique_named.map do |name| resolve_keg name @@ -187,9 +177,10 @@ def downcased_unique_named end.uniq end - def spec(default = :stable) - @override_spec || default + def spec + @override_spec end + private :spec def resolve_keg(name) raise UsageError if name.blank?
true
Other
Homebrew
brew
e40eece17bdf83b6d93fc8fff36f94938db22cd3.json
Add cask options to `brew reinstall`.
Library/Homebrew/cmd/reinstall.rb
@@ -16,6 +16,39 @@ module Homebrew module_function def reinstall_args + cask_only_options = [ + [:switch, "--cask", "--casks", { + description: "Treat all named arguments as casks.", + }], + *Cask::Cmd::OPTIONS, + *Cask::Cmd::AbstractCommand::OPTIONS, + ] + + formula_only_options = [ + [:switch, "--formula", "--formulae", { + description: "Treat all named arguments as formulae.", + }], + [:switch, "-s", "--build-from-source", { + description: "Compile <formula> from source even if a bottle is available.", + }], + [:switch, "-i", "--interactive", { + description: "Download and patch <formula>, then open a shell. This allows the user to "\ + "run `./configure --help` and otherwise determine how to turn the software "\ + "package into a Homebrew package.", + }], + [:switch, "--force-bottle", { + description: "Install from a bottle if it exists for the current or newest version of "\ + "macOS, even if it would not normally be used for installation.", + }], + [:switch, "--keep-tmp", { + description: "Retain the temporary files created during installation.", + }], + [:switch, "--display-times", { + env: :display_install_times, + description: "Print install times for each formula at the end of the run.", + }], + ] + Homebrew::CLI::Parser.new do usage_banner <<~EOS `reinstall` [<options>] <formula>|<cask> @@ -29,26 +62,23 @@ def reinstall_args switch "-d", "--debug", description: "If brewing fails, open an interactive debugging session with access to IRB "\ "or a shell inside the temporary build directory." - switch "-s", "--build-from-source", - description: "Compile <formula> from source even if a bottle is available." - switch "-i", "--interactive", - description: "Download and patch <formula>, then open a shell. This allows the user to "\ - "run `./configure --help` and otherwise determine how to turn the software "\ - "package into a Homebrew package." - switch "--force-bottle", - description: "Install from a bottle if it exists for the current or newest version of "\ - "macOS, even if it would not normally be used for installation." - switch "--keep-tmp", - description: "Retain the temporary files created during installation." switch "-f", "--force", description: "Install without checking for previously installed keg-only or "\ "non-migrated versions." switch "-v", "--verbose", description: "Print the verification and postinstall steps." - switch "--display-times", - env: :display_install_times, - description: "Print install times for each formula at the end of the run." conflicts "--build-from-source", "--force-bottle" + + formula_only_options.each do |options| + send(*options) + conflicts "--cask", options[-2] + end + + cask_only_options.each do |options| + send(*options) + conflicts "--formula", options[-2] + end + formula_options min_named 1 end @@ -61,8 +91,13 @@ def reinstall Install.perform_preinstall_checks - resolved_formulae, casks = args.named.to_resolved_formulae_to_casks - resolved_formulae.each do |f| + only = :cask if args.cask? && !args.formula? + only = :formula if !args.cask? && args.formula? + + formulae, casks = args.named.to_formulae_and_casks(only: only, method: :resolve) + .partition { |o| o.is_a?(Formula) } + + formulae.each do |f| if f.pinned? onoe "#{f.full_name} is pinned. You must unpin it to reinstall." next @@ -74,18 +109,18 @@ def reinstall Upgrade.check_installed_dependents(args: args) - Homebrew.messages.display_messages(display_times: args.display_times?) + if casks.any? + Cask::Cmd::Reinstall.reinstall_casks( + *casks, + binaries: EnvConfig.cask_opts_binaries?, + verbose: args.verbose?, + force: args.force?, + require_sha: EnvConfig.cask_opts_require_sha?, + skip_cask_deps: args.skip_cask_deps?, + quarantine: EnvConfig.cask_opts_quarantine?, + ) + end - return if casks.blank? - - Cask::Cmd::Reinstall.reinstall_casks( - *casks, - binaries: EnvConfig.cask_opts_binaries?, - verbose: args.verbose?, - force: args.force?, - require_sha: EnvConfig.cask_opts_require_sha?, - skip_cask_deps: args.skip_cask_deps?, - quarantine: EnvConfig.cask_opts_quarantine?, - ) + Homebrew.messages.display_messages(display_times: args.display_times?) end end
true
Other
Homebrew
brew
16d5596fbdbebccfd18fe94fa8c8c72f6823cf46.json
Fix code style.
Library/Homebrew/cmd/install.rb
@@ -74,15 +74,18 @@ def install_args [:switch, "--HEAD", { description: "If <formula> defines it, install the HEAD version, aka. master, trunk, unstable.", - }], [:switch, "--fetch-HEAD", { + }], + [:switch, "--fetch-HEAD", { description: "Fetch the upstream repository to detect if the HEAD installation of the "\ "formula is outdated. Otherwise, the repository's HEAD will only be checked for "\ "updates when a new stable or development version has been released.", - }], [:switch, "--keep-tmp", { + }], + [:switch, "--keep-tmp", { description: "Retain the temporary files created during installation.", - }], [:switch, "--build-bottle", { + }], + [:switch, "--build-bottle", { description: "Prepare the formula for eventual bottling during installation, skipping any "\ "post-install steps.", @@ -104,7 +107,7 @@ def install_args }], [:switch, "-g", "--git", { description: "Create a Git repository, useful for creating patches to the software.", - }] + }], ] Homebrew::CLI::Parser.new do
false
Other
Homebrew
brew
4016e746cd558a131a996dc9091e44bcc2ce8548.json
Fix _brew_upgrade completion function I found an error that was breaking my `brew upgrade ...` zsh completion
completions/zsh/_brew
@@ -818,7 +818,7 @@ _brew_update_test() { # install-options is copied from brew install _brew_upgrade() { _arguments \ - '--cask[upgrade installed Casks with newer versions]' + '--cask[upgrade installed Casks with newer versions]' \ '--cleanup[remove previously installed formula version(s)]' \ '--fetch-HEAD[detect if the HEAD installation of the formula is outdated]' \ - normal-install \
false
Other
Homebrew
brew
43648100b4164944783cdc21c4dca74d8c4c2263.json
virtualenv: use version 20 to support Python 3.9
Library/Homebrew/language/python.rb
@@ -116,9 +116,28 @@ module Virtualenv def self.included(base) base.class_eval do resource "homebrew-virtualenv" do - url "https://files.pythonhosted.org/packages/11/74" \ - "/2c151a13ef41ab9fb43b3c4ff9e788e0496ed7923b2078d42cab30622bdf/virtualenv-16.7.4.tar.gz" - sha256 "94a6898293d07f84a98add34c4df900f8ec64a570292279f6d91c781d37fd305" + url "https://files.pythonhosted.org/packages/85/3e/6c3abf78b2207f3565ebadd0b99d1945f4ff18abdc6879617a4f6d939e41/virtualenv-20.0.33.tar.gz" + sha256 "a5e0d253fe138097c6559c906c528647254f437d1019af9d5a477b09bfa7300f" + end + + resource "homebrew-appdirs" do + url "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz" + sha256 "7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41" + end + + resource "homebrew-distlib" do + url "https://files.pythonhosted.org/packages/2f/83/1eba07997b8ba58d92b3e51445d5bf36f9fba9cb8166bcae99b9c3464841/distlib-0.3.1.zip" + sha256 "edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1" + end + + resource "homebrew-filelock" do + url "https://files.pythonhosted.org/packages/14/ec/6ee2168387ce0154632f856d5cc5592328e9cf93127c5c9aeca92c8c16cb/filelock-3.0.12.tar.gz" + sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59" + end + + resource "homebrew-six" do + url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz" + sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259" end end end @@ -217,6 +236,14 @@ def create old_pythonpath = ENV.delete "PYTHONPATH" begin staging = Pathname.new(stage.staging.tmpdir) + + ENV.prepend_create_path "PYTHONPATH", staging/"target/vendor"/Language::Python.site_packages(@python) + %w[appdirs distlib filelock six].each do |virtualenv_dependency| + @formula.resource("homebrew-#{virtualenv_dependency}").stage do + @formula.system @python, *Language::Python.setup_install_args(staging/"target/vendor") + end + end + ENV.prepend_create_path "PYTHONPATH", staging/"target"/Language::Python.site_packages(@python) @formula.system @python, *Language::Python.setup_install_args(staging/"target") @formula.system @python, "-s", staging/"target/bin/virtualenv", "-p", @python, @venv_root
false
Other
Homebrew
brew
a8629dcda0e7043fc5b27ae9a64145788dfd3e8f.json
sorbet: Update RBI files and prune files.yaml. Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml).
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -8150,6 +8150,8 @@ module Homebrew::EnvConfig def self.no_install_cleanup?(); end + def self.no_installed_dependents_check?(); end + def self.no_proxy(); end def self.pry?(); end @@ -19413,6 +19415,10 @@ class RuboCop::Cop::FormulaAudit::GitUrls def url_has_revision?(param0=T.unsafe(nil)); end end +class RuboCop::Cop::FormulaAudit::Licenses + def license_exception?(param0=T.unsafe(nil)); end +end + class RuboCop::Cop::FormulaAudit::Miscellaneous def conditional_dependencies(param0); end @@ -20453,34 +20459,8 @@ module RubyToken def self.def_token(token_n, super_token=T.unsafe(nil), reading=T.unsafe(nil), *opts); end end -module RubyVM::AbstractSyntaxTree -end - class RubyVM::AbstractSyntaxTree::Node - def children(); end - - def first_column(); end - - def first_lineno(); end - - def last_column(); end - - def last_lineno(); end - def pretty_print_children(q, names=T.unsafe(nil)); end - - def type(); end -end - -class RubyVM::AbstractSyntaxTree::Node -end - -module RubyVM::AbstractSyntaxTree - def self.of(_); end - - def self.parse(_); end - - def self.parse_file(_); end end module RubyVM::MJIT
false
Other
Homebrew
brew
ea57ef794e90ed2e94cb4aba6d136e155264429c.json
audit: remove python 3.9 from unstable allowlist
Library/Homebrew/dev-cmd/audit.rb
@@ -718,7 +718,6 @@ def get_repo_data(regex) # used for formulae that are unstable but need CI run without being in homebrew/core UNSTABLE_DEVEL_ALLOWLIST = { - "python@3.9" => "3.9.0rc", }.freeze GNOME_DEVEL_ALLOWLIST = {
false
Other
Homebrew
brew
41fe6b5e7c83e7934fd08ec958b315247ae87dce.json
shared_audits: add home-assistant to GITHUB_PRERELEASE_ALLOWLIST
Library/Homebrew/utils/shared_audits.rb
@@ -32,6 +32,7 @@ def github_release_data(user, repo, tag) "elm-format" => "0.8.3", "freetube" => :all, "gitless" => "0.8.8", + "home-assistant" => :all, "infrakit" => "0.5", "pock" => :all, "riff" => "0.5.0",
false
Other
Homebrew
brew
14cba7f648f0ccd2235cbd815855abe6cb909c1a.json
tab: fix nil modification time
Library/Homebrew/tab.rb
@@ -324,7 +324,7 @@ def version_scheme end def source_modified_time - Time.at(super) + Time.at(super || 0) end def to_json(options = nil)
false
Other
Homebrew
brew
5645f79b7a796e57a99ec78aa65825f20477321b.json
sorbet: Update RBI files and prune files.yaml. Autogenerated by [a scheduled GitHub Action](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml).
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -19409,6 +19409,10 @@ class RuboCop::Cop::FormulaAudit::DeprecateDisableReason def reason(param0); end end +class RuboCop::Cop::FormulaAudit::GitUrls + def url_has_revision?(param0=T.unsafe(nil)); end +end + class RuboCop::Cop::FormulaAudit::Miscellaneous def conditional_dependencies(param0); end @@ -19437,6 +19441,10 @@ class RuboCop::Cop::FormulaAudit::Text def prefix_path(param0); end end +class RuboCop::Cop::FormulaAuditStrict::GitUrls + def url_has_tag?(param0=T.unsafe(nil)); end +end + class RuboCop::Cop::FormulaAuditStrict::Text def interpolated_share_path_starts_with(param0, param1); end
false