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 | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb | @@ -4,10 +4,13 @@
require "requirement"
class OsxfuseRequirement < Requirement
+ extend T::Sig
+
download "https://osxfuse.github.io/"
satisfy(build_env: false) { self.class.binary_osxfuse_installed? }
+ sig { returns(T::Boolean) }
def self.binary_osxfuse_installed?
File.exist?("/usr/local/inclu... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/extend/pathname.rb | @@ -5,6 +5,8 @@
require "metafiles"
module DiskUsageExtension
+ extend T::Sig
+
def disk_usage
return @disk_usage if @disk_usage
@@ -19,6 +21,7 @@ def file_count
@file_count
end
+ sig { returns(String) }
def abv
out = +""
compute_disk_usage
@@ -71,6 +74,8 @@ def compute_disk_usage... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/formula.rb | @@ -52,6 +52,8 @@
# end
# end</pre>
class Formula
+ extend T::Sig
+
include FileUtils
include Utils::Inreplace
include Utils::Shebang
@@ -286,6 +288,7 @@ def installed_alias_path
path
end
+ sig { returns(T.nilable(String)) }
def installed_alias_name
File.basename(installed_alias_path) ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/formula_creator.rb | @@ -9,6 +9,8 @@ module Homebrew
#
# @api private
class FormulaCreator
+ extend T::Sig
+
attr_reader :args, :url, :sha256, :desc, :homepage
attr_accessor :name, :version, :tap, :path, :mode, :license
@@ -88,6 +90,7 @@ def generate!
path.write ERB.new(template, trim_mode: ">").result(bindin... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/formula_installer.rb | @@ -28,6 +28,8 @@
#
# @api private
class FormulaInstaller
+ extend T::Sig
+
include FormulaCellarChecks
extend Predicable
@@ -776,6 +778,7 @@ def finish
unlock
end
+ sig { returns(String) }
def summary
s = +""
s << "#{Homebrew::EnvConfig.install_badge} " unless Homebrew::EnvConfig.n... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/formula_support.rb | @@ -7,6 +7,8 @@
# Used to annotate formulae that duplicate macOS-provided software
# or cause conflicts when linked in.
class KegOnlyReason
+ extend T::Sig
+
attr_reader :reason
def initialize(reason, explanation)
@@ -30,6 +32,7 @@ def by_macos?
provided_by_macos? || shadowed_by_macos?
end
+ sig ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/formulary.rb | @@ -10,10 +10,13 @@
#
# @api private
module Formulary
+ extend T::Sig
+
extend Cachable
URL_START_REGEX = %r{(https?|ftp|file)://}.freeze
+ sig { void }
def self.enable_factory_cache!
@factory_cache = true
end
@@ -208,8 +211,11 @@ def initialize(path)
# Loads formulae from URLs.
class ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/hardware.rb | @@ -13,6 +13,8 @@ class CPU
PPC_64BIT_ARCHS = [:ppc64, :ppc64le, :ppc970].freeze
class << self
+ extend T::Sig
+
def optimization_flags
@optimization_flags ||= {
native: arch_flag("native"),
@@ -29,6 +31,7 @@ def optimization_flags
end
alias generi... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/keg.rb | @@ -11,6 +11,8 @@
#
# @api private
class Keg
+ extend T::Sig
+
extend Cachable
# Error for when a keg is already linked.
@@ -39,6 +41,9 @@ def initialize(keg, src, dst, cause)
# Error for when a file already exists or belongs to another keg.
class ConflictError < LinkError
+ extend T::Sig
+
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/language/node.rb | @@ -6,6 +6,9 @@ module Language
#
# @api public
module Node
+ extend T::Sig
+
+ sig { returns(String) }
def self.npm_cache_config
"cache=#{HOMEBREW_CACHE}/npm_cache"
end
@@ -73,6 +76,7 @@ def self.std_npm_install_args(libexec)
args
end
+ sig { returns(T::Array[String]) }... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/language/python.rb | @@ -114,6 +114,8 @@ def detected_python_shebang(formula = self)
# Mixin module for {Formula} adding virtualenv support features.
module Virtualenv
+ extend T::Sig
+
def self.included(base)
base.class_eval do
resource "homebrew-virtualenv" do
@@ -215,6 +217,7 @@ def virtualenv... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/linkage_checker.rb | @@ -10,6 +10,8 @@
#
# @api private
class LinkageChecker
+ extend T::Sig
+
attr_reader :undeclared_deps, :keg, :formula, :store
def initialize(keg, formula = nil, cache_db:, rebuild_cache: false)
@@ -78,6 +80,7 @@ def display_test_output(puts_output: true)
puts "Unexpected non-missing linkage detected" ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/locale.rb | @@ -7,7 +7,9 @@
#
# @api private
class Locale
- # Error when a string cannot be parsed to a {Locale}.
+ extend T::Sig
+
+ # Error when a string cannot be parsed to a `Locale`.
class ParserError < StandardError
end
@@ -34,6 +36,7 @@ def self.parse(string)
raise ParserError, "'#{string}' cannot be pars... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/messages.rb | @@ -4,8 +4,11 @@
# A {Messages} object collects messages that may need to be displayed together
# at the end of a multi-step `brew` command run.
class Messages
+ extend T::Sig
+
attr_reader :caveats, :formula_count, :install_times
+ sig { void }
def initialize
@caveats = []
@formula_count = 0 | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/migrator.rb | @@ -9,6 +9,8 @@
#
# @api private
class Migrator
+ extend T::Sig
+
include Context
# Error for when a migration is necessary.
@@ -155,6 +157,7 @@ def fix_tabs
end
end
+ sig { returns(T::Boolean) }
def from_same_tap_user?
formula_tap_user = formula.tap.user if formula.tap
old_tap_user ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/mktemp.rb | @@ -4,6 +4,8 @@
# Performs {Formula#mktemp}'s functionality, and tracks the results.
# Each instance is only intended to be used once.
class Mktemp
+ extend T::Sig
+
include FileUtils
# Path to the tmpdir used in this run, as a {Pathname}.
@@ -16,6 +18,7 @@ def initialize(prefix = name, opts = {})
end
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/options.rb | @@ -5,6 +5,8 @@
#
# @api private
class Option
+ extend T::Sig
+
attr_reader :name, :description, :flag
def initialize(name, description = "")
@@ -32,6 +34,7 @@ def hash
name.hash
end
+ sig { returns(String) }
def inspect
"#<#{self.class.name}: #{flag.inspect}>"
end
@@ -41,17 +44,21 @@ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/linux.rb | @@ -4,8 +4,11 @@
module OS
# Helper module for querying system information on Linux.
module Linux
+ extend T::Sig
+
module_function
+ sig { returns(String) }
def os_version
if which("lsb_release")
description = Utils.popen_read("lsb_release -d") | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/linux/glibc.rb | @@ -7,6 +7,8 @@ module Linux
#
# @api private
module Glibc
+ extend T::Sig
+
module_function
def system_version
@@ -18,6 +20,7 @@ def system_version
@system_version = Version.new version
end
+ sig { returns(Version) }
def minimum_version
Version... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/linux/kernel.rb | @@ -7,8 +7,11 @@ module Linux
#
# @api private
module Kernel
+ extend T::Sig
+
module_function
+ sig { returns(Version) }
def minimum_version
Version.new "2.6.32"
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/mac.rb | @@ -10,6 +10,8 @@
module OS
# Helper module for querying system information on macOS.
module Mac
+ extend T::Sig
+
module_function
# rubocop:disable Naming/ConstantName
@@ -81,6 +83,7 @@ def active_developer_dir
@active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-pat... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/mac/sdk.rb | @@ -92,6 +92,9 @@ def sdk_paths
#
# @api private
class XcodeSDKLocator < BaseSDKLocator
+ extend T::Sig
+
+ sig { returns(Symbol) }
def source
:xcode
end
@@ -115,6 +118,9 @@ def sdk_prefix
#
# @api private
class CLTSDKLocator < BaseSDKLocator
+ extend ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/mac/xcode.rb | @@ -7,15 +7,18 @@ module Mac
#
# @api private
module Xcode
+ extend T::Sig
+
module_function
- DEFAULT_BUNDLE_PATH = Pathname.new("/Applications/Xcode.app").freeze
+ DEFAULT_BUNDLE_PATH = Pathname("/Applications/Xcode.app").freeze
BUNDLE_ID = "com.apple.dt.Xcode"
OLD... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/os/mac/xquartz.rb | @@ -7,9 +7,11 @@ module Mac
#
# @api private
module XQuartz
+ extend T::Sig
+
module_function
- DEFAULT_BUNDLE_PATH = Pathname.new("Applications/Utilities/XQuartz.app").freeze
+ DEFAULT_BUNDLE_PATH = Pathname("Applications/Utilities/XQuartz.app").freeze
FORGE_BUNDLE_ID = "o... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/patch.rb | @@ -60,13 +60,16 @@ def self.normalize_legacy_patches(list)
#
# @api private
class EmbeddedPatch
+ extend T::Sig
+
attr_writer :owner
attr_reader :strip
def initialize(strip)
@strip = strip
end
+ sig { returns(T::Boolean) }
def external?
false
end
@@ -79,6 +82,7 @@ def apply
Ut... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirement.rb | @@ -12,6 +12,8 @@
#
# @api private
class Requirement
+ extend T::Sig
+
include Dependable
attr_reader :tags, :name, :cask, :download
@@ -35,6 +37,7 @@ def option_names
end
# The message to show when the requirement is not met.
+ sig { returns(String) }
def message
_, _, class_name = self.cl... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/arch_requirement.rb | @@ -7,6 +7,8 @@
#
# @api private
class ArchRequirement < Requirement
+ extend T::Sig
+
fatal true
attr_reader :arch
@@ -24,6 +26,7 @@ def initialize(tags)
end
end
+ sig { returns(String) }
def message
"The #{@arch} architecture is required for this software."
end
@@ -32,6 +35,7 @@ def ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/codesign_requirement.rb | @@ -5,6 +5,8 @@
#
# @api private
class CodesignRequirement < Requirement
+ extend T::Sig
+
fatal true
def initialize(tags)
@@ -26,6 +28,7 @@ def initialize(tags)
end
end
+ sig { returns(String) }
def message
message = "#{@identity} identity must be available to build with #{@with}"
m... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/java_requirement.rb | @@ -7,6 +7,8 @@
#
# @api private
class JavaRequirement < Requirement
+ extend T::Sig
+
fatal true
attr_reader :java_home, :version
@@ -37,13 +39,15 @@ def initialize(tags = [])
@cask = suggestion.token
end
+ sig { returns(String) }
def message
version_string = " #{@version}" if @version
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/linux_requirement.rb | @@ -5,10 +5,13 @@
#
# @api private
class LinuxRequirement < Requirement
+ extend T::Sig
+
fatal true
satisfy(build_env: false) { OS.linux? }
+ sig { returns(String) }
def message
"Linux is required for this software."
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/macos_requirement.rb | @@ -7,6 +7,8 @@
#
# @api private
class MacOSRequirement < Requirement
+ extend T::Sig
+
fatal true
attr_reader :comparator, :version
@@ -66,10 +68,12 @@ def message(type: :formula)
end
end
+ sig { returns(String) }
def inspect
"#<#{self.class.name}: version#{@comparator}#{@version.to_s.in... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/tuntap_requirement.rb | @@ -7,10 +7,13 @@
#
# @api private
class TuntapRequirement < Requirement
+ extend T::Sig
+
fatal true
cask "tuntap"
satisfy(build_env: false) { self.class.binary_tuntap_installed? }
+ sig { returns(T::Boolean) }
def self.binary_tuntap_installed?
%w[
/Library/Extensions/tun.kext | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/x11_requirement.rb | @@ -7,6 +7,8 @@
#
# @api private
class X11Requirement < Requirement
+ extend T::Sig
+
include Comparable
fatal true
@@ -16,10 +18,12 @@ class X11Requirement < Requirement
env { ENV.x11 }
+ sig { returns(String) }
def min_version
"1.12.2"
end
+ sig { returns(String) }
def min_xdpyinf... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/requirements/xcode_requirement.rb | @@ -7,6 +7,8 @@
#
# @api private
class XcodeRequirement < Requirement
+ extend T::Sig
+
fatal true
attr_reader :version
@@ -25,6 +27,7 @@ def xcode_installed_version
MacOS::Xcode.version >= @version
end
+ sig { returns(String) }
def message
version = " #{@version}" if @version
messag... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/resource.rb | @@ -253,6 +253,8 @@ def directory(val = nil)
#
# @api private
class ResourceStageContext
+ extend T::Sig
+
extend Forwardable
# The {Resource} that is being staged.
@@ -268,6 +270,7 @@ def initialize(resource, staging)
@staging = staging
end
+ sig { returns(String) }
def to_s
"<#{self.cla... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/rubocops.rb | @@ -3,6 +3,8 @@
require_relative "load_path"
+require "utils/sorbet"
+
require "rubocop-performance"
require "rubocop-rspec"
require "rubocop-sorbet" | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/rubocops/cask/ast/cask_header.rb | @@ -7,6 +7,8 @@ module AST
# This class wraps the AST method node that represents the cask header. It
# includes various helper methods to aid cops in their analysis.
class CaskHeader
+ extend T::Sig
+
def initialize(method_node)
@method_node = method_node
end
@@... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/rubocops/cask/extend/string.rb | @@ -3,6 +3,9 @@
# Utility method extensions for String.
class String
+ extend T::Sig
+
+ sig { returns(String) }
def undent
gsub(/^.{#{(slice(/^ +/) || '').length}}/, "")
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/rubocops/cask/no_dsl_version.rb | @@ -19,6 +19,8 @@ module Cask
# ...
# end
class NoDslVersion < Cop
+ extend T::Sig
+
extend Forwardable
include CaskHelp
@@ -56,6 +58,7 @@ def offense
message: error_msg)
end
+ sig { returns(String)... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/rubocops/patches.rb | @@ -9,6 +9,8 @@ module Cop
module FormulaAudit
# This cop audits `patch`es in formulae.
class Patches < FormulaCop
+ extend T::Sig
+
def audit_formula(node, _class_node, _parent_class_node, body)
@full_source_content = source_buffer(node).source
@@ -121,6 +123,7 @@ def in... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/rubocops/urls.rb | @@ -294,6 +294,8 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
#
# @api private
class PyPiUrls < FormulaCop
+ extend T::Sig
+
def audit_formula(_node, _class_node, _parent_class_node, body_node)
urls = find_every_func_call_by_name(body_node, :url... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/sandbox.rb | @@ -8,13 +8,17 @@
#
# @api private
class Sandbox
+ extend T::Sig
+
SANDBOX_EXEC = "/usr/bin/sandbox-exec"
private_constant :SANDBOX_EXEC
+ sig { returns(T::Boolean) }
def self.available?
OS.mac? && File.executable?(SANDBOX_EXEC)
end
+ sig { void }
def initialize
@profile = SandboxProf... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/software_spec.rb | @@ -14,6 +14,8 @@
require "os/mac/version"
class SoftwareSpec
+ extend T::Sig
+
extend Forwardable
PREDEFINED_OPTIONS = {
@@ -78,6 +80,7 @@ def bottle_unneeded?
@bottle_disable_reason.unneeded?
end
+ sig { returns(T::Boolean) }
def bottle_disabled?
@bottle_disable_reason ? true : false
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/style.rb | @@ -269,13 +269,16 @@ def corrected?
# Source location of a style offense.
class LineLocation
+ extend T::Sig
+
attr_reader :line, :column
def initialize(json)
@line = json["line"]
@column = json["column"]
end
+ sig { returns(String) }
def to_s
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/system_command.rb | @@ -15,6 +15,8 @@
#
# @api private
class SystemCommand
+ extend T::Sig
+
# Helper functions for calling {SystemCommand.run}.
module Mixin
def system_command(*args)
@@ -39,6 +41,7 @@ def self.run!(command, **options)
run(command, **options, must_succeed: true)
end
+ sig { returns(SystemCommand:... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/system_config.rb | @@ -12,6 +12,8 @@
# @api private
module SystemConfig
class << self
+ extend T::Sig
+
include SystemCommand::Mixin
def clang
@@ -30,34 +32,42 @@ def clang_build
end
end
+ sig { returns(String) }
def head
HOMEBREW_REPOSITORY.git_head || "(none)"
end
+ sig { retur... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/tab.rb | @@ -12,6 +12,8 @@
# hash and creates an attribute for each key and value. Rather than calling
# `new` directly, use one of the class methods like {Tab.create}.
class Tab < OpenStruct
+ extend T::Sig
+
extend Cachable
FILENAME = "INSTALL_RECEIPT.json"
@@ -324,6 +326,7 @@ def version_scheme
versions["ver... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/tap.rb | @@ -12,6 +12,8 @@
# {#user} represents the GitHub username and {#repo} represents the repository
# name without the leading `homebrew-`.
class Tap
+ extend T::Sig
+
extend Cachable
TAP_DIRECTORY = (HOMEBREW_LIBRARY/"Taps").freeze
@@ -123,6 +125,7 @@ def remote
end
# The default remote path to this {... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/test/exceptions_spec.rb | @@ -48,12 +48,12 @@
it "returns a string if there is a dependent" do
subject.dependent = "foobar"
- expect(subject.dependent_s).to eq("(dependency of foobar)")
+ expect(subject.dependent_s).to eq(" (dependency of foobar)")
end
end
context "without a dependent" do
- its(:to_s) { i... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/test/rubocop_spec.rb | @@ -10,11 +10,12 @@
ENV.delete(key) if key.start_with?("HOMEBREW_")
end
- ENV["XDG_CACHE_HOME"] = "#{HOMEBREW_CACHE}/style"
+ ENV["XDG_CACHE_HOME"] = (HOMEBREW_CACHE.realpath/"style").to_s
end
it "loads all Formula cops without errors" do
- stdout, _, status = Open3.capture3... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/air.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking Adobe Air archives.
class Air
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".air"]
end
@@ -28,6 +31,7 @@ def dependencies
private
+ si... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/bazaar.rb | @@ -6,6 +6,8 @@
module UnpackStrategy
# Strategy for unpacking Bazaar archives.
class Bazaar < Directory
+ extend T::Sig
+
using Magic
def self.can_extract?(path)
@@ -14,11 +16,12 @@ def self.can_extract?(path)
private
+ sig { override.params(unpack_dir: Pathname, basename: Pathname, v... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/bzip2.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking bzip2 archives.
class Bzip2
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".bz2"]
end
@@ -18,6 +21,7 @@ def self.can_extract?(path)
private
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/cab.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking Cabinet archives.
class Cab
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".cab"]
end
@@ -16,6 +19,7 @@ def self.can_extract?(path)
path.mag... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/compress.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking compress archives.
class Compress < Tar
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".Z"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/directory.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking directories.
class Directory
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[]
end
@@ -18,6 +21,7 @@ def self.can_extract?(path)
private
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/dmg.rb | @@ -6,6 +6,8 @@
module UnpackStrategy
# Strategy for unpacking disk images.
class Dmg
+ extend T::Sig
+
include UnpackStrategy
# Helper module for listing the contents of a volume mounted from a disk image.
@@ -54,6 +56,8 @@ def bom
# Strategy for unpacking a volume mounted from a disk imag... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/executable.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking executables.
class Executable < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".sh", ".bash"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/fossil.rb | @@ -6,11 +6,14 @@
module UnpackStrategy
# Strategy for unpacking Fossil repositories.
class Fossil
+ extend T::Sig
+
include UnpackStrategy
extend SystemCommand::Mixin
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[]
end
@@ -25,6 +28,7 @@ def self.c... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/generic_unar.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking archives with `unar`.
class GenericUnar
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[]
end
@@ -22,6 +25,7 @@ def dependencies
private
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/gzip.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking gzip archives.
class Gzip
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".gz"]
end
@@ -18,6 +21,7 @@ def self.can_extract?(path)
private
+... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/jar.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking Java archives.
class Jar < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".apk", ".jar"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/lha.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking LHa archives.
class Lha
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".lha", ".lzh"]
end
@@ -22,6 +25,7 @@ def dependencies
private
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/lua_rock.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking LuaRock archives.
class LuaRock < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".rock"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/lzip.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking lzip archives.
class Lzip
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".lz"]
end
@@ -22,6 +25,7 @@ def dependencies
private
+ sig { o... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/lzma.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking LZMA archives.
class Lzma
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".lzma"]
end
@@ -16,6 +19,7 @@ def self.can_extract?(path)
path.magi... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/microsoft_office_xml.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking Microsoft Office documents.
class MicrosoftOfficeXml < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[
".doc", ".docx", | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/otf.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking OpenType fonts.
class Otf < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".otf"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/p7zip.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking P7ZIP archives.
class P7Zip
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".7z"]
end
@@ -22,6 +25,7 @@ def dependencies
private
+ sig {... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/pax.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking pax archives.
class Pax
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".pax"]
end
@@ -18,6 +21,7 @@ def self.can_extract?(_path)
private
+... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/pkg.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking macOS package installers.
class Pkg < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".pkg", ".mkpg"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/rar.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking RAR archives.
class Rar
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".rar"]
end
@@ -22,6 +25,7 @@ def dependencies
private
+ sig { ov... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/self_extracting_executable.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking self-extracting executables.
class SelfExtractingExecutable < GenericUnar
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/sit.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking Stuffit archives.
class Sit < GenericUnar
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".sit"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/tar.rb | @@ -6,11 +6,14 @@
module UnpackStrategy
# Strategy for unpacking tar archives.
class Tar
+ extend T::Sig
+
include UnpackStrategy
extend SystemCommand::Mixin
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[
".tar",
@@ -33,6 +36,7 @@ def self.can_... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/ttf.rb | @@ -6,8 +6,11 @@
module UnpackStrategy
# Strategy for unpacking TrueType fonts.
class Ttf < Uncompressed
+ extend T::Sig
+
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".ttc", ".ttf"]
end | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/uncompressed.rb | @@ -4,6 +4,8 @@
module UnpackStrategy
# Strategy for unpacking uncompressed files.
class Uncompressed
+ extend T::Sig
+
include UnpackStrategy
def extract_nestedly(prioritise_extension: false, **options)
@@ -12,6 +14,7 @@ def extract_nestedly(prioritise_extension: false, **options)
private
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/xar.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking xar archives.
class Xar
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".xar"]
end
@@ -18,6 +21,7 @@ def self.can_extract?(path)
private
+ ... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/unpack_strategy/xz.rb | @@ -4,10 +4,13 @@
module UnpackStrategy
# Strategy for unpacking xz archives.
class Xz
+ extend T::Sig
+
include UnpackStrategy
using Magic
+ sig { returns(T::Array[String]) }
def self.extensions
[".xz"]
end
@@ -22,6 +25,7 @@ def dependencies
private
+ sig { overr... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils.rb | @@ -80,6 +80,8 @@ def inject_dump_stats!(the_module, pattern)
end
module Kernel
+ extend T::Sig
+
def require?(path)
return false if path.nil?
@@ -383,6 +385,7 @@ def ignore_interrupts(opt = nil)
trap("INT", std_trap)
end
+ sig { returns(String) }
def capture_stderr
old = $stderr
... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/analytics.rb | @@ -9,6 +9,8 @@ module Utils
# @api private
module Analytics
class << self
+ extend T::Sig
+
include Context
def report(type, metadata = {})
@@ -191,6 +193,7 @@ def cask_output(cask, args:)
get_analytics(json, args: args)
end
+ sig { returns(String) }
def cu... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/bottles.rb | @@ -9,6 +9,8 @@ module Utils
# @api private
module Bottles
class << self
+ extend T::Sig
+
def tag
@tag ||= "#{ENV["HOMEBREW_PROCESSOR"]}_#{ENV["HOMEBREW_SYSTEM"]}".downcase.to_sym
end
@@ -30,6 +32,7 @@ def file_outdated?(f, file)
bottle_ext && bottle_url_ext && bottle_ex... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/gems.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
# Never `require` anything in this file (except English). It needs to be able to
@@ -57,7 +57,7 @@ def setup_gem_environment!(gem_home: nil, gem_bindir: nil)
# Add necessary Ruby and Gem binary directories to PATH.
gem_bindir |... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/gems.rbi | @@ -0,0 +1,27 @@
+# typed: strict
+
+module Homebrew
+ sig { returns(String) }
+ def ruby_bindir; end
+
+ sig { returns(String) }
+ def gem_user_bindir; end
+
+ sig { params(message: String).void }
+ def ohai_if_defined(message); end
+
+ sig { params(message: String).returns(T.noreturn) }
+ def odie_if_defined(... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/github.rb | @@ -10,6 +10,8 @@
#
# @api private
module GitHub
+ extend T::Sig
+
module_function
API_URL = "https://api.github.com"
@@ -129,6 +131,7 @@ def api_credentials
end
end
+ sig { returns(Symbol) }
def api_credentials_type
if Homebrew::EnvConfig.github_api_token
:env_token | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/github/actions.rb | @@ -17,6 +17,8 @@ def self.escape(string)
# Helper class for formatting annotations on GitHub Actions.
class Annotation
+ extend T::Sig
+
def self.path_relative_to_workspace(path)
workspace = Pathname(ENV.fetch("GITHUB_WORKSPACE", Dir.pwd)).realpath
path = Pathname(path)
@@ -35... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/utils/sorbet.rb | @@ -1,4 +1,4 @@
-# typed: strict
+# typed: true
# frozen_string_literal: true
if ENV["HOMEBREW_SORBET_RUNTIME"]
@@ -7,7 +7,11 @@
require "sorbet-runtime"
else
# Explicitly prevent `sorbet-runtime` from being loaded.
- ENV["GEM_SKIP"] = "sorbet-runtime"
+ def gem(name, *)
+ raise Gem::LoadError if name =... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/version.rb | @@ -7,6 +7,8 @@
#
# @api private
class Version
+ extend T::Sig
+
include Comparable
def self.formula_optionally_versioned_regex(name, full: true)
@@ -15,6 +17,8 @@ def self.formula_optionally_versioned_regex(name, full: true)
# A part of a {Version}.
class Token
+ extend T::Sig
+
include Com... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | Library/Homebrew/version/null.rb | @@ -4,6 +4,8 @@
class Version
# Represents the absence of a version.
NULL = Class.new do
+ extend T::Sig
+
include Comparable
def <=>(_other)
@@ -18,19 +20,23 @@ def eql?(_other)
false
end
+ sig { returns(T::Boolean) }
def detected_from_url?
false
end
+ sig {... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | docs/Manpage.md | @@ -70,58 +70,58 @@ Homebrew Cask provides a friendly CLI workflow for the administration of macOS a
Commands:
- `--cache`
- Display the file used to cache a *`cask`*
+ Display the file used to cache a *`cask`*.
- `audit`
- Check *`cask`* for Homebrew coding style violations
+ Check *`cask`* for Homebrew... | true |
Other | Homebrew | brew | da9289eff0bd360341424e3366f2526b4e7c89c0.json | Add more type signatures. | manpages/brew.1 | @@ -70,109 +70,109 @@ Commands:
\fB\-\-cache\fR
.
.br
-Display the file used to cache a \fIcask\fR
+Display the file used to cache a \fIcask\fR\.
.
.IP "\(bu" 4
\fBaudit\fR
.
.br
-Check \fIcask\fR for Homebrew coding style violations
+Check \fIcask\fR for Homebrew coding style violations\.
.
.IP "\(bu" 4
\fB... | true |
Other | Homebrew | brew | 26c4dc954f350dc46cd774db9e441999ed912b09.json | docs/Installation.md: Fix a small typo | docs/Installation.md | @@ -31,8 +31,8 @@ Just extract (or `git clone`) Homebrew wherever you want. Just avoid:
* `/tmp` subdirectories because Homebrew gets upset.
* `/sw` and `/opt/local` because build scripts get confused when Homebrew is there instead of Fink or MacPorts, respectively.
-However do yourself a favour and install to `/us... | false |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/.rubocop_todo.yml | @@ -12,6 +12,7 @@ Style/Documentation:
- 'keg_relocate.rb'
- 'os/linux/global.rb'
- 'os/mac/architecture_list.rb'
+ - 'os/mac/global.rb'
- 'os/mac/keg.rb'
- 'reinstall.rb'
- 'software_spec.rb' | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/brew.rb | @@ -164,7 +164,7 @@ class MissingEnvironmentVariables < RuntimeError; end
if e.formula.head? || e.formula.deprecated? || e.formula.disabled?
$stderr.puts <<~EOS
Please create pull requests instead of asking for help on Homebrew's GitHub,
- Discourse, Twitter or IRC.
+ Discourse, Twitter or any ... | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/dev-cmd/bottle.rb | @@ -15,7 +15,9 @@
<% if root_url != "#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles" %>
root_url "<%= root_url %>"
<% end %>
- <% if ![HOMEBREW_DEFAULT_PREFIX, LINUXBREW_DEFAULT_PREFIX].include?(prefix) %>
+ <% if ![HOMEBREW_DEFAULT_PREFIX,
+ HOMEBREW_MACOS_ARM_DEFAULT_PREFIX,
+ HO... | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/diagnostic.rb | @@ -112,8 +112,9 @@ def please_create_pull_requests(what = "unsupported configuration")
<<~EOS
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
- Discourse, Twitter or IRC. You are responsible for r... | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -63,6 +63,7 @@ def fatal_setup_build_environment_checks
def supported_configuration_checks
%w[
+ check_for_unsupported_arch
check_for_unsupported_macos
].freeze
end
@@ -90,21 +91,35 @@ def check_for_non_prefixed_findutils
nil
end
- def chec... | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/extend/os/mac/hardware/cpu.rb | @@ -64,11 +64,11 @@ def universal_archs
[arch_64_bit, arch_32_bit].extend ArchitectureListExtension
end
- # True when running under an Intel-based shell via Rosetta on an
+ # True when running under an Intel-based shell via Rosetta 2 on an
# Apple Silicon Mac. This can be detected via... | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/extend/os/mac/system_config.rb | @@ -51,6 +51,7 @@ def dump_verbose_config(f = $stdout)
f.puts "CLT: #{clt || "N/A"}"
f.puts "Xcode: #{xcode || "N/A"}"
f.puts "XQuartz: #{xquartz}" if xquartz
+ f.puts "Rosetta 2: #{Hardware::CPU.in_rosetta2?}" if Hardware::CPU.physical_cpu_arm64?
end
end
end | true |
Other | Homebrew | brew | 5afff3f3aa1d806855d460e5f39bfbef28ef6262.json | Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure ... | Library/Homebrew/formula_installer.rb | @@ -235,12 +235,17 @@ def check_install_sanity
recursive_formulae = recursive_deps.map(&:to_formula)
recursive_dependencies = []
+ invalid_arch_dependencies = []
recursive_formulae.each do |dep|
dep_recursive_dependencies = dep.recursive_dependencies.map(&:to_s)
if dep_recursive_depend... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.