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 | 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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/global.rb | @@ -69,7 +69,8 @@
"(KHTML, like Gecko) Version/10.0.3 Safari/602.4.8"
HOMEBREW_DEFAULT_PREFIX = "/usr/local"
-LINUXBREW_DEFAULT_PREFIX = "/home/linuxbrew/.linuxbrew"
+HOMEBREW_MACOS_ARM_DEFAULT_PREFIX = "/opt/homebrew"
+HOMEBREW_LINUX_DEFAULT_PREFIX = "/home/linuxbrew/.linuxbrew"
require "fileutils"
require "os/global" | 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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/hardware.rb | @@ -156,7 +156,7 @@ def arch_flag(arch)
"-march=#{arch}"
end
- def in_rosetta?
+ def in_rosetta2?
false
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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/install.rb | @@ -14,6 +14,7 @@ module Install
module_function
def perform_preinstall_checks(all_fatal: false, cc: nil)
+ check_prefix
check_cpu
attempt_directory_creation
check_cc_argv(cc)
@@ -28,20 +29,27 @@ def perform_build_from_source_checks(all_fatal: false)
Diagnostic.checks(:build_from_source_checks, fatal: all_fatal)
end
+ def check_prefix
+ if Hardware::CPU.intel? && HOMEBREW_PREFIX == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX
+ odie "Cannot install in Homebrew on Intel processor in ARM default prefix (#{HOMEBREW_PREFIX})!"
+ elsif Hardware::CPU.arm? && HOMEBREW_PREFIX == HOMEBREW_DEFAULT_PREFIX
+ odie "Cannot install in Homebrew on ARM processor in Intel default prefix (#{HOMEBREW_PREFIX})!"
+ end
+ end
+
def check_cpu
return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
- message = "Sorry, Homebrew does not support your computer's CPU architecture!"
- if Hardware::CPU.arm?
- opoo message
- return
- elsif Hardware::CPU.ppc?
- message += <<~EOS
- For PowerPC Mac (PPC32/PPC64BE) support, see:
- #{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
- EOS
- end
- abort message
+ # Handled by check_for_unsupported_arch in extend/os/mac/diagnostic.rb
+ return if Hardware::CPU.arm?
+
+ return unless Hardware::CPU.ppc?
+
+ odie <<~EOS
+ Sorry, Homebrew does not support your computer's CPU architecture!
+ For PowerPC Mac (PPC32/PPC64BE) support, see:
+ #{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
+ EOS
end
private_class_method :check_cpu
| 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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/os/global.rb | @@ -1,4 +1,8 @@
# typed: strict
# frozen_string_literal: true
-require "os/linux/global" if OS.linux?
+if OS.mac?
+ require "os/mac/global"
+elsif OS.linux?
+ require "os/linux/global"
+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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/os/linux/global.rb | @@ -12,6 +12,6 @@ module Homebrew
DEFAULT_PREFIX ||= if Homebrew::EnvConfig.force_homebrew_on_linux?
HOMEBREW_DEFAULT_PREFIX
else
- LINUXBREW_DEFAULT_PREFIX
+ HOMEBREW_LINUX_DEFAULT_PREFIX
end.freeze
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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/os/mac/global.rb | @@ -0,0 +1,10 @@
+# typed: false
+# frozen_string_literal: true
+
+module Homebrew
+ DEFAULT_PREFIX ||= if Hardware::CPU.arm?
+ HOMEBREW_MACOS_ARM_DEFAULT_PREFIX
+ else
+ HOMEBREW_DEFAULT_PREFIX
+ end.freeze
+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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -13404,8 +13404,10 @@ class Object
HOMEBREW_LIBRARY = ::T.let(nil, ::T.untyped)
HOMEBREW_LIBRARY_PATH = ::T.let(nil, ::T.untyped)
HOMEBREW_LINKED_KEGS = ::T.let(nil, ::T.untyped)
+ HOMEBREW_LINUX_DEFAULT_PREFIX = ::T.let(nil, ::T.untyped)
HOMEBREW_LOCKS = ::T.let(nil, ::T.untyped)
HOMEBREW_LOGS = ::T.let(nil, ::T.untyped)
+ HOMEBREW_MACOS_ARM_DEFAULT_PREFIX = ::T.let(nil, ::T.untyped)
HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX = ::T.let(nil, ::T.untyped)
HOMEBREW_PATCHELF_RB_WRITE = ::T.let(nil, ::T.untyped)
HOMEBREW_PINNED_KEGS = ::T.let(nil, ::T.untyped)
@@ -13428,7 +13430,6 @@ class Object
HOMEBREW_VERSION = ::T.let(nil, ::T.untyped)
HOMEBREW_WWW = ::T.let(nil, ::T.untyped)
HOMEPAGE_URL = ::T.let(nil, ::T.untyped)
- LINUXBREW_DEFAULT_PREFIX = ::T.let(nil, ::T.untyped)
MAXIMUM_STRING_MATCHES = ::T.let(nil, ::T.untyped)
OFFICIAL_CASK_TAPS = ::T.let(nil, ::T.untyped)
OFFICIAL_CMD_TAPS = ::T.let(nil, ::T.untyped) | 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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | Library/Homebrew/tab.rb | @@ -186,6 +186,7 @@ def self.empty
"compiler" => DevelopmentTools.default_compiler,
"aliases" => [],
"runtime_dependencies" => nil,
+ "arch" => nil,
"source" => {
"path" => nil,
"tap" => nil,
@@ -345,6 +346,7 @@ def to_json(options = nil)
"aliases" => aliases,
"runtime_dependencies" => runtime_dependencies,
"source" => source,
+ "arch" => Hardware::CPU.arch,
"built_on" => built_on,
}
| 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 they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux
While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
don't support it (yet).
- Don't reference non-existent IRC channel | docs/Installation.md | @@ -31,10 +31,11 @@ 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 `/usr/local`. Some things may
+However do yourself a favour and install to `/usr/local` on macOS Intel, `/opt/homebrew` on macOS ARM
+and `.home/linuxbrew/.linuxbrew` on Linux. Some things may
not build when installed elsewhere. One of the reasons Homebrew just
works relative to the competition is **because** we recommend installing
-to `/usr/local`. *Pick another prefix at your peril!*
+here. *Pick another prefix at your peril!*
```sh
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew | true |
Other | Homebrew | brew | c1c8bda3edcd896d6ba8a5496b302330e3db6962.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -2980,6 +2980,10 @@ end
BasicObject::BasicObject = BasicObject
+class BasicSocket
+ def read_nonblock(len, str=T.unsafe(nil), exception: T.unsafe(nil)); end
+end
+
class Benchmark::Job
def initialize(width); end
end
@@ -5580,10 +5584,6 @@ class Cask::Cask
def zap(&block); end
end
-class Cask::Cmd::AbstractCommand
- include ::Homebrew::Search::Extension
-end
-
class Cask::Config
def appdir(); end
@@ -6725,10 +6725,6 @@ module DependenciesHelpers
include ::DependenciesHelpers::Compat
end
-class Descriptions
- extend ::Homebrew::Search::Extension
-end
-
class Dir
def children(); end
@@ -6983,81 +6979,37 @@ class Enumerator::Generator
def initialize(*_); end
end
-class Errno::EAUTH
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EAUTH
-end
-
-class Errno::EBADARCH
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EBADARCH
-end
+Errno::EAUTH = Errno::NOERROR
-class Errno::EBADEXEC
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EBADARCH = Errno::NOERROR
-class Errno::EBADEXEC
-end
+Errno::EBADEXEC = Errno::NOERROR
-class Errno::EBADMACHO
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EBADMACHO = Errno::NOERROR
-class Errno::EBADMACHO
-end
+Errno::EBADRPC = Errno::NOERROR
-class Errno::EBADRPC
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ECAPMODE = Errno::NOERROR
-class Errno::EBADRPC
-end
+Errno::EDEADLOCK = Errno::EDEADLK
-Errno::EDEADLOCK = Errno::NOERROR
-
-class Errno::EDEVERR
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EDEVERR
-end
+Errno::EDEVERR = Errno::NOERROR
Errno::EDOOFUS = Errno::NOERROR
-class Errno::EFTYPE
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EFTYPE
-end
+Errno::EFTYPE = Errno::NOERROR
Errno::EIPSEC = Errno::NOERROR
-class Errno::ENEEDAUTH
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ELAST = Errno::NOERROR
-class Errno::ENEEDAUTH
-end
+Errno::ENEEDAUTH = Errno::NOERROR
-class Errno::ENOATTR
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ENOATTR = Errno::NOERROR
-class Errno::ENOATTR
-end
+Errno::ENOPOLICY = Errno::NOERROR
-class Errno::ENOPOLICY
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::ENOPOLICY
-end
+Errno::ENOTCAPABLE = Errno::NOERROR
class Errno::ENOTSUP
Errno = ::T.let(nil, ::T.untyped)
@@ -7066,61 +7018,21 @@ end
class Errno::ENOTSUP
end
-class Errno::EPROCLIM
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROCLIM
-end
-
-class Errno::EPROCUNAVAIL
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROCUNAVAIL
-end
-
-class Errno::EPROGMISMATCH
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROGMISMATCH
-end
-
-class Errno::EPROGUNAVAIL
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EPROCLIM = Errno::NOERROR
-class Errno::EPROGUNAVAIL
-end
+Errno::EPROCUNAVAIL = Errno::NOERROR
-class Errno::EPWROFF
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EPROGMISMATCH = Errno::NOERROR
-class Errno::EPWROFF
-end
+Errno::EPROGUNAVAIL = Errno::NOERROR
-class Errno::EQFULL
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EPWROFF = Errno::NOERROR
-class Errno::EQFULL
-end
+Errno::EQFULL = Errno::NOERROR
-class Errno::ERPCMISMATCH
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ERPCMISMATCH = Errno::NOERROR
-class Errno::ERPCMISMATCH
-end
-
-class Errno::ESHLIBVERS
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::ESHLIBVERS
-end
+Errno::ESHLIBVERS = Errno::NOERROR
class Etc::Group
def gid(); end
@@ -7150,16 +7062,8 @@ class Etc::Group
end
class Etc::Passwd
- def change(); end
-
- def change=(_); end
-
def dir=(_); end
- def expire(); end
-
- def expire=(_); end
-
def gecos(); end
def gecos=(_); end
@@ -7172,10 +7076,6 @@ class Etc::Passwd
def shell=(_); end
- def uclass(); end
-
- def uclass=(_); end
-
def uid=(_); end
end
@@ -7271,6 +7171,10 @@ module Fiddle
WINDOWS = ::T.let(nil, ::T.untyped)
end
+class Fiddle::Function
+ STDCALL = ::T.let(nil, ::T.untyped)
+end
+
class File
def self.atomic_write(file_name, temp_dir=T.unsafe(nil)); end
@@ -8299,13 +8203,8 @@ module Homebrew::MissingFormula
extend ::T::Private::Methods::SingletonMethodHooks
end
-module Homebrew::Search
- include ::Homebrew::Search::Extension
-end
-
module Homebrew
extend ::FileUtils::StreamUtils_
- extend ::Homebrew::Search::Extension
extend ::DependenciesHelpers::Compat
extend ::Homebrew::Compat
def self.default_prefix?(prefix=T.unsafe(nil)); end
@@ -13477,7 +13376,6 @@ class Object
def to_query(key); end
def to_yaml(options=T.unsafe(nil)); end
- APPLE_GEM_HOME = ::T.let(nil, ::T.untyped)
APPLY_A = ::T.let(nil, ::T.untyped)
APPLY_B = ::T.let(nil, ::T.untyped)
APPLY_C = ::T.let(nil, ::T.untyped)
@@ -13550,8 +13448,6 @@ class Object
RUBY_DESCRIPTION = ::T.let(nil, ::T.untyped)
RUBY_ENGINE = ::T.let(nil, ::T.untyped)
RUBY_ENGINE_VERSION = ::T.let(nil, ::T.untyped)
- RUBY_FRAMEWORK = ::T.let(nil, ::T.untyped)
- RUBY_FRAMEWORK_VERSION = ::T.let(nil, ::T.untyped)
RUBY_PATCHLEVEL = ::T.let(nil, ::T.untyped)
RUBY_PATH = ::T.let(nil, ::T.untyped)
RUBY_PLATFORM = ::T.let(nil, ::T.untyped)
@@ -13612,7 +13508,11 @@ class OpenSSL::KDF::KDFError
end
module OpenSSL::KDF
+ def self.hkdf(*_); end
+
def self.pbkdf2_hmac(*_); end
+
+ def self.scrypt(*_); end
end
class OpenSSL::OCSP::Request
@@ -13621,20 +13521,29 @@ end
OpenSSL::PKCS7::Signer = OpenSSL::PKCS7::SignerInfo
+class OpenSSL::PKey::EC
+ EXPLICIT_CURVE = ::T.let(nil, ::T.untyped)
+end
+
class OpenSSL::PKey::EC::Point
def to_octet_string(_); end
end
module OpenSSL::SSL
+ OP_ALLOW_NO_DHE_KEX = ::T.let(nil, ::T.untyped)
OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = ::T.let(nil, ::T.untyped)
OP_CRYPTOPRO_TLSEXT_BUG = ::T.let(nil, ::T.untyped)
OP_LEGACY_SERVER_CONNECT = ::T.let(nil, ::T.untyped)
+ OP_NO_ENCRYPT_THEN_MAC = ::T.let(nil, ::T.untyped)
+ OP_NO_RENEGOTIATION = ::T.let(nil, ::T.untyped)
+ OP_NO_TLSv1_3 = ::T.let(nil, ::T.untyped)
OP_SAFARI_ECDHE_ECDSA_BUG = ::T.let(nil, ::T.untyped)
OP_TLSEXT_PADDING = ::T.let(nil, ::T.untyped)
SSL2_VERSION = ::T.let(nil, ::T.untyped)
SSL3_VERSION = ::T.let(nil, ::T.untyped)
TLS1_1_VERSION = ::T.let(nil, ::T.untyped)
TLS1_2_VERSION = ::T.let(nil, ::T.untyped)
+ TLS1_3_VERSION = ::T.let(nil, ::T.untyped)
TLS1_VERSION = ::T.let(nil, ::T.untyped)
end
@@ -13649,6 +13558,8 @@ class OpenSSL::SSL::SSLContext
def alpn_select_cb=(alpn_select_cb); end
+ def enable_fallback_scsv(); end
+
def max_version=(version); end
def min_version=(version); end
@@ -15229,8 +15140,8 @@ class Parser::Ruby26
end
class Pathname
- include ::MachOShim
include ::ELFShim
+ include ::MachOShim
def fnmatch?(*_); end
def glob(*_); end
@@ -28373,188 +28284,6 @@ module Singleton
def self.__init__(klass); end
end
-class Socket
- AF_CCITT = ::T.let(nil, ::T.untyped)
- AF_CHAOS = ::T.let(nil, ::T.untyped)
- AF_CNT = ::T.let(nil, ::T.untyped)
- AF_COIP = ::T.let(nil, ::T.untyped)
- AF_DATAKIT = ::T.let(nil, ::T.untyped)
- AF_DLI = ::T.let(nil, ::T.untyped)
- AF_E164 = ::T.let(nil, ::T.untyped)
- AF_ECMA = ::T.let(nil, ::T.untyped)
- AF_HYLINK = ::T.let(nil, ::T.untyped)
- AF_IMPLINK = ::T.let(nil, ::T.untyped)
- AF_ISO = ::T.let(nil, ::T.untyped)
- AF_LAT = ::T.let(nil, ::T.untyped)
- AF_LINK = ::T.let(nil, ::T.untyped)
- AF_NATM = ::T.let(nil, ::T.untyped)
- AF_NDRV = ::T.let(nil, ::T.untyped)
- AF_NETBIOS = ::T.let(nil, ::T.untyped)
- AF_NS = ::T.let(nil, ::T.untyped)
- AF_OSI = ::T.let(nil, ::T.untyped)
- AF_PPP = ::T.let(nil, ::T.untyped)
- AF_PUP = ::T.let(nil, ::T.untyped)
- AF_SIP = ::T.let(nil, ::T.untyped)
- AF_SYSTEM = ::T.let(nil, ::T.untyped)
- AI_DEFAULT = ::T.let(nil, ::T.untyped)
- AI_MASK = ::T.let(nil, ::T.untyped)
- AI_V4MAPPED_CFG = ::T.let(nil, ::T.untyped)
- EAI_BADHINTS = ::T.let(nil, ::T.untyped)
- EAI_MAX = ::T.let(nil, ::T.untyped)
- EAI_PROTOCOL = ::T.let(nil, ::T.untyped)
- IFF_ALTPHYS = ::T.let(nil, ::T.untyped)
- IFF_LINK0 = ::T.let(nil, ::T.untyped)
- IFF_LINK1 = ::T.let(nil, ::T.untyped)
- IFF_LINK2 = ::T.let(nil, ::T.untyped)
- IFF_OACTIVE = ::T.let(nil, ::T.untyped)
- IFF_SIMPLEX = ::T.let(nil, ::T.untyped)
- IPPROTO_EON = ::T.let(nil, ::T.untyped)
- IPPROTO_GGP = ::T.let(nil, ::T.untyped)
- IPPROTO_HELLO = ::T.let(nil, ::T.untyped)
- IPPROTO_MAX = ::T.let(nil, ::T.untyped)
- IPPROTO_ND = ::T.let(nil, ::T.untyped)
- IPPROTO_XTP = ::T.let(nil, ::T.untyped)
- IPV6_DONTFRAG = ::T.let(nil, ::T.untyped)
- IPV6_PATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_RECVPATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_USE_MIN_MTU = ::T.let(nil, ::T.untyped)
- IP_PORTRANGE = ::T.let(nil, ::T.untyped)
- IP_RECVDSTADDR = ::T.let(nil, ::T.untyped)
- IP_RECVIF = ::T.let(nil, ::T.untyped)
- LOCAL_PEERCRED = ::T.let(nil, ::T.untyped)
- MSG_EOF = ::T.let(nil, ::T.untyped)
- MSG_FLUSH = ::T.let(nil, ::T.untyped)
- MSG_HAVEMORE = ::T.let(nil, ::T.untyped)
- MSG_HOLD = ::T.let(nil, ::T.untyped)
- MSG_RCVMORE = ::T.let(nil, ::T.untyped)
- MSG_SEND = ::T.let(nil, ::T.untyped)
- PF_CCITT = ::T.let(nil, ::T.untyped)
- PF_CHAOS = ::T.let(nil, ::T.untyped)
- PF_CNT = ::T.let(nil, ::T.untyped)
- PF_COIP = ::T.let(nil, ::T.untyped)
- PF_DATAKIT = ::T.let(nil, ::T.untyped)
- PF_DLI = ::T.let(nil, ::T.untyped)
- PF_ECMA = ::T.let(nil, ::T.untyped)
- PF_HYLINK = ::T.let(nil, ::T.untyped)
- PF_IMPLINK = ::T.let(nil, ::T.untyped)
- PF_ISO = ::T.let(nil, ::T.untyped)
- PF_LAT = ::T.let(nil, ::T.untyped)
- PF_LINK = ::T.let(nil, ::T.untyped)
- PF_NATM = ::T.let(nil, ::T.untyped)
- PF_NDRV = ::T.let(nil, ::T.untyped)
- PF_NETBIOS = ::T.let(nil, ::T.untyped)
- PF_NS = ::T.let(nil, ::T.untyped)
- PF_OSI = ::T.let(nil, ::T.untyped)
- PF_PIP = ::T.let(nil, ::T.untyped)
- PF_PPP = ::T.let(nil, ::T.untyped)
- PF_PUP = ::T.let(nil, ::T.untyped)
- PF_RTIP = ::T.let(nil, ::T.untyped)
- PF_SIP = ::T.let(nil, ::T.untyped)
- PF_SYSTEM = ::T.let(nil, ::T.untyped)
- PF_XTP = ::T.let(nil, ::T.untyped)
- SCM_CREDS = ::T.let(nil, ::T.untyped)
- SO_DONTTRUNC = ::T.let(nil, ::T.untyped)
- SO_NKE = ::T.let(nil, ::T.untyped)
- SO_NOSIGPIPE = ::T.let(nil, ::T.untyped)
- SO_NREAD = ::T.let(nil, ::T.untyped)
- SO_USELOOPBACK = ::T.let(nil, ::T.untyped)
- SO_WANTMORE = ::T.let(nil, ::T.untyped)
- SO_WANTOOBFLAG = ::T.let(nil, ::T.untyped)
- TCP_NOOPT = ::T.let(nil, ::T.untyped)
- TCP_NOPUSH = ::T.let(nil, ::T.untyped)
-end
-
-module Socket::Constants
- AF_CCITT = ::T.let(nil, ::T.untyped)
- AF_CHAOS = ::T.let(nil, ::T.untyped)
- AF_CNT = ::T.let(nil, ::T.untyped)
- AF_COIP = ::T.let(nil, ::T.untyped)
- AF_DATAKIT = ::T.let(nil, ::T.untyped)
- AF_DLI = ::T.let(nil, ::T.untyped)
- AF_E164 = ::T.let(nil, ::T.untyped)
- AF_ECMA = ::T.let(nil, ::T.untyped)
- AF_HYLINK = ::T.let(nil, ::T.untyped)
- AF_IMPLINK = ::T.let(nil, ::T.untyped)
- AF_ISO = ::T.let(nil, ::T.untyped)
- AF_LAT = ::T.let(nil, ::T.untyped)
- AF_LINK = ::T.let(nil, ::T.untyped)
- AF_NATM = ::T.let(nil, ::T.untyped)
- AF_NDRV = ::T.let(nil, ::T.untyped)
- AF_NETBIOS = ::T.let(nil, ::T.untyped)
- AF_NS = ::T.let(nil, ::T.untyped)
- AF_OSI = ::T.let(nil, ::T.untyped)
- AF_PPP = ::T.let(nil, ::T.untyped)
- AF_PUP = ::T.let(nil, ::T.untyped)
- AF_SIP = ::T.let(nil, ::T.untyped)
- AF_SYSTEM = ::T.let(nil, ::T.untyped)
- AI_DEFAULT = ::T.let(nil, ::T.untyped)
- AI_MASK = ::T.let(nil, ::T.untyped)
- AI_V4MAPPED_CFG = ::T.let(nil, ::T.untyped)
- EAI_BADHINTS = ::T.let(nil, ::T.untyped)
- EAI_MAX = ::T.let(nil, ::T.untyped)
- EAI_PROTOCOL = ::T.let(nil, ::T.untyped)
- IFF_ALTPHYS = ::T.let(nil, ::T.untyped)
- IFF_LINK0 = ::T.let(nil, ::T.untyped)
- IFF_LINK1 = ::T.let(nil, ::T.untyped)
- IFF_LINK2 = ::T.let(nil, ::T.untyped)
- IFF_OACTIVE = ::T.let(nil, ::T.untyped)
- IFF_SIMPLEX = ::T.let(nil, ::T.untyped)
- IPPROTO_EON = ::T.let(nil, ::T.untyped)
- IPPROTO_GGP = ::T.let(nil, ::T.untyped)
- IPPROTO_HELLO = ::T.let(nil, ::T.untyped)
- IPPROTO_MAX = ::T.let(nil, ::T.untyped)
- IPPROTO_ND = ::T.let(nil, ::T.untyped)
- IPPROTO_XTP = ::T.let(nil, ::T.untyped)
- IPV6_DONTFRAG = ::T.let(nil, ::T.untyped)
- IPV6_PATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_RECVPATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_USE_MIN_MTU = ::T.let(nil, ::T.untyped)
- IP_PORTRANGE = ::T.let(nil, ::T.untyped)
- IP_RECVDSTADDR = ::T.let(nil, ::T.untyped)
- IP_RECVIF = ::T.let(nil, ::T.untyped)
- LOCAL_PEERCRED = ::T.let(nil, ::T.untyped)
- MSG_EOF = ::T.let(nil, ::T.untyped)
- MSG_FLUSH = ::T.let(nil, ::T.untyped)
- MSG_HAVEMORE = ::T.let(nil, ::T.untyped)
- MSG_HOLD = ::T.let(nil, ::T.untyped)
- MSG_RCVMORE = ::T.let(nil, ::T.untyped)
- MSG_SEND = ::T.let(nil, ::T.untyped)
- PF_CCITT = ::T.let(nil, ::T.untyped)
- PF_CHAOS = ::T.let(nil, ::T.untyped)
- PF_CNT = ::T.let(nil, ::T.untyped)
- PF_COIP = ::T.let(nil, ::T.untyped)
- PF_DATAKIT = ::T.let(nil, ::T.untyped)
- PF_DLI = ::T.let(nil, ::T.untyped)
- PF_ECMA = ::T.let(nil, ::T.untyped)
- PF_HYLINK = ::T.let(nil, ::T.untyped)
- PF_IMPLINK = ::T.let(nil, ::T.untyped)
- PF_ISO = ::T.let(nil, ::T.untyped)
- PF_LAT = ::T.let(nil, ::T.untyped)
- PF_LINK = ::T.let(nil, ::T.untyped)
- PF_NATM = ::T.let(nil, ::T.untyped)
- PF_NDRV = ::T.let(nil, ::T.untyped)
- PF_NETBIOS = ::T.let(nil, ::T.untyped)
- PF_NS = ::T.let(nil, ::T.untyped)
- PF_OSI = ::T.let(nil, ::T.untyped)
- PF_PIP = ::T.let(nil, ::T.untyped)
- PF_PPP = ::T.let(nil, ::T.untyped)
- PF_PUP = ::T.let(nil, ::T.untyped)
- PF_RTIP = ::T.let(nil, ::T.untyped)
- PF_SIP = ::T.let(nil, ::T.untyped)
- PF_SYSTEM = ::T.let(nil, ::T.untyped)
- PF_XTP = ::T.let(nil, ::T.untyped)
- SCM_CREDS = ::T.let(nil, ::T.untyped)
- SO_DONTTRUNC = ::T.let(nil, ::T.untyped)
- SO_NKE = ::T.let(nil, ::T.untyped)
- SO_NOSIGPIPE = ::T.let(nil, ::T.untyped)
- SO_NREAD = ::T.let(nil, ::T.untyped)
- SO_USELOOPBACK = ::T.let(nil, ::T.untyped)
- SO_WANTMORE = ::T.let(nil, ::T.untyped)
- SO_WANTOOBFLAG = ::T.let(nil, ::T.untyped)
- TCP_NOOPT = ::T.let(nil, ::T.untyped)
- TCP_NOPUSH = ::T.let(nil, ::T.untyped)
-end
-
class SoftwareSpec
def cached_download(*args, &block); end
| false |
Other | Homebrew | brew | e9be4cb83d9c4e58b3894c63eac26fe0034fc96e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/parallel@1.20.0.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `parallel` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -26,7 +26,6 @@ module Parallel
def call_with_index(item, index, options, &block); end
def create_workers(job_factory, options, &block); end
def extract_count_from_options(options); end
- def handle_exception(exception, results); end
def process_incoming_jobs(read, write, job_factory, options, &block); end
def replace_worker(job_factory, workers, i, options, blk); end
def with_instrumentation(item, index, options); end
@@ -38,6 +37,9 @@ module Parallel
end
class Parallel::Break < ::StandardError
+ def initialize(value = T.unsafe(nil)); end
+
+ def value; end
end
class Parallel::DeadWorker < ::StandardError
@@ -63,7 +65,7 @@ class Parallel::JobFactory
def queue_wrapper(array); end
end
-class Parallel::Kill < ::StandardError
+class Parallel::Kill < ::Parallel::Break
end
module Parallel::ProcessorCount
@@ -105,7 +107,7 @@ class Parallel::Worker
def read; end
def stop; end
def thread; end
- def thread=(_); end
+ def thread=(_arg0); end
def work(data); end
def write; end
| true |
Other | Homebrew | brew | e9be4cb83d9c4e58b3894c63eac26fe0034fc96e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.1.1.rbi | @@ -929,10 +929,10 @@ class RuboCop::AST::NodePattern::Compiler::Debug::Colorizer::Result < ::Struct
def color_map_for(node, color); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -1078,7 +1078,7 @@ RuboCop::AST::NodePattern::Lexer::Error = RuboCop::AST::NodePattern::LexerRex::S
class RuboCop::AST::NodePattern::LexerRex
def action; end
def filename; end
- def filename=(_); end
+ def filename=(_arg0); end
def location; end
def match; end
def matches; end
@@ -1087,11 +1087,15 @@ class RuboCop::AST::NodePattern::LexerRex
def parse_file(path); end
def scanner_class; end
def ss; end
- def ss=(_); end
+ def ss=(_arg0); end
def state; end
- def state=(_); end
+ def state=(_arg0); end
end
+RuboCop::AST::NodePattern::LexerRex::CALL = T.let(T.unsafe(nil), Regexp)
+
+RuboCop::AST::NodePattern::LexerRex::CONST_NAME = T.let(T.unsafe(nil), Regexp)
+
RuboCop::AST::NodePattern::LexerRex::IDENTIFIER = T.let(T.unsafe(nil), Regexp)
class RuboCop::AST::NodePattern::LexerRex::LexerError < ::StandardError
@@ -1340,6 +1344,8 @@ RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_D
RuboCop::AST::NodePattern::Sets::SET_ALL_CONTEXT = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = T.let(T.unsafe(nil), Set)
+
RuboCop::AST::NodePattern::Sets::SET_ANY_ALL_NORETURN_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_ANY_INSTANCE_ALLOW_ANY_INSTANCE_OF_EXPECT_ANY_INSTANCE_OF = T.let(T.unsafe(nil), Set)
@@ -1362,8 +1368,6 @@ RuboCop::AST::NodePattern::Sets::SET_CALL_RUN = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_CAPTURE2_CAPTURE2E_CAPTURE3_ETC = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_CHANNEL_CONTROLLER_HELPER_ETC = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_CIPHER_DIGEST = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_CLASS_EVAL_INSTANCE_EVAL = T.let(T.unsafe(nil), Set)
@@ -1386,18 +1390,6 @@ RuboCop::AST::NodePattern::Sets::SET_DEBUGGER_BYEBUG_REMOTE_BYEBUG = T.let(T.uns
RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_2 = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_3 = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_4 = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_5 = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC_6 = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_FEATURE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_DOUBLE_SPY = T.let(T.unsafe(nil), Set)
@@ -1418,12 +1410,8 @@ RuboCop::AST::NodePattern::Sets::SET_EXACTLY_AT_LEAST_AT_MOST = T.let(T.unsafe(n
RuboCop::AST::NodePattern::Sets::SET_EXPECT_ALLOW = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_EXPECT_IS_EXPECTED_EXPECT_ANY_INSTANCE_OF = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_FDESCRIBE_FCONTEXT_FFEATURE_ETC = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST_POP_ETC = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_FIRST_LAST__ETC = T.let(T.unsafe(nil), Set)
@@ -1452,16 +1440,6 @@ RuboCop::AST::NodePattern::Sets::SET_IO_FILE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_IT_BEHAVES_LIKE_IT_SHOULD_BEHAVE_LIKE_INCLUDE_EXAMPLES = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_IT_BEHAVES_LIKE_IT_SHOULD_BEHAVE_LIKE_INCLUDE_EXAMPLES_INCLUDE_CONTEXT = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_IT_SPECIFY_EXAMPLE_ETC = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_IT_SPECIFY_EXAMPLE_ETC_2 = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_IT_SPECIFY_EXAMPLE_ETC_3 = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set)
@@ -1470,10 +1448,6 @@ RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_LENGTH_SIZE = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_LET_LET = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_LET_LET_SUBJECT_SUBJECT = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_LOAD_RESTORE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_MAP_COLLECT = T.let(T.unsafe(nil), Set)
@@ -1488,18 +1462,14 @@ RuboCop::AST::NodePattern::Sets::SET_NEW_OPEN = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_NIL_ = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_PENDING_XIT_XSPECIFY_ETC = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_PIPELINE_PIPELINE_R_PIPELINE_RW_ETC = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_PREPEND_BEFORE_BEFORE_APPEND_BEFORE_ETC = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_PREPEND_BEFORE_BEFORE_APPEND_BEFORE_ETC_2 = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PRIVATE_PROTECTED_PUBLIC = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_PROC_LAMBDA = T.let(T.unsafe(nil), Set)
+
RuboCop::AST::NodePattern::Sets::SET_PROP_CONST = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_PRY_REMOTE_PRY_PRY_REMOTE_CONSOLE = T.let(T.unsafe(nil), Set)
@@ -1520,23 +1490,21 @@ RuboCop::AST::NodePattern::Sets::SET_RECEIVE_MESSAGE_CHAIN_STUB_CHAIN = T.let(T.
RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGES_RECEIVE_MESSAGE_CHAIN_HAVE_RECEIVED = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = T.let(T.unsafe(nil), Set)
+
RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set)
+
RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_SAVE_AND_OPEN_PAGE_SAVE_AND_OPEN_SCREENSHOT_SAVE_SCREENSHOT = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_SAVE_AND_OPEN_PAGE_SAVE_AND_OPEN_SCREENSHOT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_SHARED_CONTEXT = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_SHARED_EXAMPLES_SHARED_EXAMPLES_FOR = T.let(T.unsafe(nil), Set)
-
-RuboCop::AST::NodePattern::Sets::SET_SHARED_EXAMPLES_SHARED_EXAMPLES_FOR_SHARED_CONTEXT = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_SHARED_EXAMPLES_SHARED_EXAMPLES_FOR_SHARED_CONTEXT_ETC = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set)
@@ -1556,18 +1524,14 @@ RuboCop::AST::NodePattern::Sets::SET_START_WITH_STARTS_WITH_END_WITH_ENDS_WITH =
RuboCop::AST::NodePattern::Sets::SET_STRUCT_CLASS = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_SUBJECT_SUBJECT = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_SUCC_PRED_NEXT = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_TIME_DATETIME = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET_TO_ENUM_ENUM_FOR = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TO_I_TO_F_TO_C = T.let(T.unsafe(nil), Set)
-RuboCop::AST::NodePattern::Sets::SET_TO_TO_NOT_NOT_TO = T.let(T.unsafe(nil), Set)
-
RuboCop::AST::NodePattern::Sets::SET_TRUE_FALSE = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET_TYPE_TEMPLATE_TYPE_MEMBER = T.let(T.unsafe(nil), Set)
@@ -1598,6 +1562,8 @@ RuboCop::AST::NodePattern::Sets::SET___6 = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET___7 = T.let(T.unsafe(nil), Set)
+RuboCop::AST::NodePattern::Sets::SET___8 = T.let(T.unsafe(nil), Set)
+
RuboCop::AST::NodePattern::Sets::SET____ = T.let(T.unsafe(nil), Set)
RuboCop::AST::NodePattern::Sets::SET____ETC = T.let(T.unsafe(nil), Set) | true |
Other | Homebrew | brew | e9be4cb83d9c4e58b3894c63eac26fe0034fc96e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.0.0.rbi | @@ -54,6 +54,10 @@ class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base
def on_new_investigation; end
+ private
+
+ def token_aligner; end
+
class << self
def autocorrect_incompatible_with; end
end
@@ -66,6 +70,10 @@ class RuboCop::Cop::RSpec::AlignRightLetBrace < ::RuboCop::Cop::RSpec::Base
def on_new_investigation; end
+ private
+
+ def token_aligner; end
+
class << self
def autocorrect_incompatible_with; end
end
@@ -97,27 +105,15 @@ RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base
include(::RuboCop::RSpec::Language)
- include(::RuboCop::RSpec::Language::NodePattern)
-
- def relevant_file?(file); end
+ extend(::RuboCop::RSpec::Language::NodePattern)
- private
-
- def all_cops_config; end
- def relevant_rubocop_rspec_file?(file); end
- def rspec_pattern; end
- def rspec_pattern_config; end
- def rspec_pattern_config?; end
+ def on_new_investigation; end
class << self
def inherited(subclass); end
end
end
-RuboCop::Cop::RSpec::Base::DEFAULT_CONFIGURATION = T.let(T.unsafe(nil), Hash)
-
-RuboCop::Cop::RSpec::Base::DEFAULT_PATTERN_RE = T.let(T.unsafe(nil), Regexp)
-
class RuboCop::Cop::RSpec::Be < ::RuboCop::Cop::RSpec::Base
def be_without_args(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -226,10 +222,8 @@ end
RuboCop::Cop::RSpec::ContextWording::MSG = T.let(T.unsafe(nil), String)
-RuboCop::Cop::RSpec::Cop = RuboCop::Cop::RSpec::Base
-
class RuboCop::Cop::RSpec::DescribeClass < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def example_group_with_ignored_metadata?(param0 = T.unsafe(nil)); end
def not_a_const_described(param0 = T.unsafe(nil)); end
@@ -246,7 +240,7 @@ end
RuboCop::Cop::RSpec::DescribeClass::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::DescribeMethod < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def on_top_level_group(node); end
def second_argument(param0 = T.unsafe(nil)); end
@@ -320,8 +314,6 @@ class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base
private
def conditionals_with_examples?(body); end
- def custom_include?(method_name); end
- def custom_include_methods; end
def examples_in_branches?(if_node); end
def offensive?(body); end
end
@@ -339,9 +331,9 @@ end
RuboCop::Cop::RSpec::EmptyHook::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::RSpec::EmptyLineSeparation)
+ include(::RuboCop::Cop::RSpec::EmptyLineSeparation)
extend(::RuboCop::Cop::AutoCorrector)
def allow_consecutive_one_liners?; end
@@ -355,9 +347,9 @@ end
RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::RSpec::EmptyLineSeparation)
+ include(::RuboCop::Cop::RSpec::EmptyLineSeparation)
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
@@ -366,9 +358,9 @@ end
RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::RSpec::EmptyLineSeparation)
+ include(::RuboCop::Cop::RSpec::EmptyLineSeparation)
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
@@ -377,9 +369,9 @@ end
RuboCop::Cop::RSpec::EmptyLineAfterFinalLet::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::EmptyLineAfterHook < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::RSpec::EmptyLineSeparation)
+ include(::RuboCop::Cop::RSpec::EmptyLineSeparation)
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
@@ -388,9 +380,9 @@ end
RuboCop::Cop::RSpec::EmptyLineAfterHook::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::EmptyLineAfterSubject < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::RSpec::EmptyLineSeparation)
+ include(::RuboCop::Cop::RSpec::EmptyLineSeparation)
extend(::RuboCop::Cop::AutoCorrector)
def on_block(node); end
@@ -402,6 +394,16 @@ end
RuboCop::Cop::RSpec::EmptyLineAfterSubject::MSG = T.let(T.unsafe(nil), String)
+module RuboCop::Cop::RSpec::EmptyLineSeparation
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RangeHelp)
+
+ def last_child?(node); end
+ def missing_separating_line(node); end
+ def missing_separating_line_offense(node); end
+ def offending_loc(last_line); end
+end
+
class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::CodeLength)
@@ -638,7 +640,7 @@ RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.u
RuboCop::Cop::RSpec::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def const_described(param0 = T.unsafe(nil)); end
def on_top_level_example_group(node); end
@@ -662,6 +664,10 @@ end
RuboCop::Cop::RSpec::FilePath::MSG = T.let(T.unsafe(nil), String)
+module RuboCop::Cop::RSpec::FinalEndLocation
+ def final_end_location(start_node); end
+end
+
class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base
def focusable_selector?(param0 = T.unsafe(nil)); end
def focused_block?(param0 = T.unsafe(nil)); end
@@ -679,7 +685,6 @@ class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
- def hook?(param0 = T.unsafe(nil)); end
def on_block(node); end
def scoped_hook(param0 = T.unsafe(nil)); end
def unscoped_hook(param0 = T.unsafe(nil)); end
@@ -800,7 +805,7 @@ end
RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::InstanceVariable < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def custom_matcher?(param0 = T.unsafe(nil)); end
def dynamic_class?(param0 = T.unsafe(nil)); end
@@ -816,17 +821,6 @@ end
RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String)
-class RuboCop::Cop::RSpec::InvalidPredicateMatcher < ::RuboCop::Cop::RSpec::Base
- def invalid_predicate_matcher?(param0 = T.unsafe(nil)); end
- def on_send(node); end
-
- private
-
- def predicate?(name); end
-end
-
-RuboCop::Cop::RSpec::InvalidPredicateMatcher::MSG = T.let(T.unsafe(nil), String)
-
class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
extend(::RuboCop::Cop::AutoCorrector)
@@ -967,7 +961,7 @@ end
RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::MultipleDescribes < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def on_top_level_group(node); end
end
@@ -999,7 +993,7 @@ RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc)
class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableMax)
- include(::RuboCop::RSpec::Variable)
+ include(::RuboCop::Cop::RSpec::Variable)
def on_block(node); end
def on_new_investigation; end
@@ -1033,9 +1027,9 @@ end
RuboCop::Cop::RSpec::MultipleSubjects::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::NamedSubject < ::RuboCop::Cop::RSpec::Base
+ def example_or_hook_block?(param0 = T.unsafe(nil)); end
def ignored_shared_example?(node); end
def on_block(node); end
- def rspec_block?(param0 = T.unsafe(nil)); end
def shared_example?(param0 = T.unsafe(nil)); end
def subject_usage(param0); end
end
@@ -1044,7 +1038,7 @@ RuboCop::Cop::RSpec::NamedSubject::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableMax)
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def on_top_level_group(node); end
@@ -1103,10 +1097,6 @@ end
RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String)
-RuboCop::Cop::RSpec::Pending::PENDING = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::Cop::RSpec::Pending::SKIPPABLE = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
include(::RuboCop::Cop::RSpec::InflectedHelper)
@@ -1379,7 +1369,7 @@ end
RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::RSpec::SubjectStub < ::RuboCop::Cop::RSpec::Base
- include(::RuboCop::RSpec::TopLevelGroup)
+ include(::RuboCop::Cop::RSpec::TopLevelGroup)
def message_expectation?(param0 = T.unsafe(nil), param1); end
def message_expectation_matcher?(param0); end
@@ -1394,6 +1384,21 @@ end
RuboCop::Cop::RSpec::SubjectStub::MSG = T.let(T.unsafe(nil), String)
+module RuboCop::Cop::RSpec::TopLevelGroup
+ extend(::RuboCop::AST::NodePattern::Macros)
+
+ def on_new_investigation; end
+ def top_level_groups; end
+
+ private
+
+ def on_top_level_example_group(_node); end
+ def on_top_level_group(_node); end
+ def root_node; end
+ def top_level_group?(node); end
+ def top_level_nodes(node); end
+end
+
class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base
def block_with_args?(node); end
def empty_exception_matcher?(node); end
@@ -1403,9 +1408,19 @@ end
RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String)
+module RuboCop::Cop::RSpec::Variable
+ extend(::RuboCop::AST::NodePattern::Macros)
+
+ def variable_definition?(param0 = T.unsafe(nil)); end
+end
+
+RuboCop::Cop::RSpec::Variable::Helpers = RuboCop::RSpec::Language::Helpers
+
+RuboCop::Cop::RSpec::Variable::Subjects = RuboCop::RSpec::Language::Subjects
+
class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- include(::RuboCop::RSpec::Variable)
+ include(::RuboCop::Cop::RSpec::Variable)
def on_send(node); end
@@ -1423,7 +1438,7 @@ class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base
include(::RuboCop::Cop::ConfigurableFormatting)
include(::RuboCop::Cop::ConfigurableNaming)
include(::RuboCop::Cop::IgnoredPattern)
- include(::RuboCop::RSpec::Variable)
+ include(::RuboCop::Cop::RSpec::Variable)
def on_send(node); end
@@ -1487,7 +1502,7 @@ module RuboCop::RSpec
end
class RuboCop::RSpec::AlignLetBrace
- include(::RuboCop::RSpec::Language::NodePattern)
+ include(::RuboCop::RSpec::Language)
def initialize(root, token); end
@@ -1505,12 +1520,10 @@ class RuboCop::RSpec::AlignLetBrace
def token; end
end
-RuboCop::RSpec::CONFIG = T.let(T.unsafe(nil), Hash)
-
class RuboCop::RSpec::Concept
include(::RuboCop::RSpec::Language)
- include(::RuboCop::RSpec::Language::NodePattern)
extend(::RuboCop::AST::NodePattern::Macros)
+ extend(::RuboCop::RSpec::Language::NodePattern)
def initialize(node); end
@@ -1529,7 +1542,7 @@ end
class RuboCop::RSpec::Corrector::MoveNode
include(::RuboCop::Cop::RangeHelp)
- include(::RuboCop::RSpec::FinalEndLocation)
+ include(::RuboCop::Cop::RSpec::FinalEndLocation)
def initialize(node, corrector, processed_source); end
@@ -1546,16 +1559,6 @@ class RuboCop::RSpec::Corrector::MoveNode
def source(node); end
end
-module RuboCop::RSpec::EmptyLineSeparation
- include(::RuboCop::RSpec::FinalEndLocation)
- include(::RuboCop::Cop::RangeHelp)
-
- def last_child?(node); end
- def missing_separating_line(node); end
- def missing_separating_line_offense(node); end
- def offending_loc(last_line); end
-end
-
class RuboCop::RSpec::Example < ::RuboCop::RSpec::Concept
def definition; end
def doc_string; end
@@ -1586,10 +1589,6 @@ module RuboCop::RSpec::FactoryBot
end
end
-module RuboCop::RSpec::FinalEndLocation
- def final_end_location(start_node); end
-end
-
class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept
def example?; end
def extract_metadata(param0 = T.unsafe(nil)); end
@@ -1614,65 +1613,8 @@ module RuboCop::RSpec::Inject
end
module RuboCop::RSpec::Language
-end
-
-RuboCop::RSpec::Language::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::ExampleGroups
-end
-
-RuboCop::RSpec::Language::ExampleGroups::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::ExampleGroups::FOCUSED = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::ExampleGroups::GROUPS = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::ExampleGroups::SKIPPED = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Examples
-end
-
-RuboCop::RSpec::Language::Examples::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::Examples::EXAMPLES = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::Examples::FOCUSED = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::Examples::PENDING = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::Examples::SKIPPED = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Expectations
-end
-
-RuboCop::RSpec::Language::Expectations::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Helpers
-end
-
-RuboCop::RSpec::Language::Helpers::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Hooks
-end
-
-RuboCop::RSpec::Language::Hooks::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Hooks::Scopes
-end
-
-RuboCop::RSpec::Language::Hooks::Scopes::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Includes
-end
-
-RuboCop::RSpec::Language::Includes::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::Includes::CONTEXT = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::Includes::EXAMPLES = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::NodePattern
extend(::RuboCop::AST::NodePattern::Macros)
+ extend(::RuboCop::RSpec::Language::NodePattern)
def example?(param0 = T.unsafe(nil)); end
def example_group?(param0 = T.unsafe(nil)); end
@@ -1684,89 +1626,40 @@ module RuboCop::RSpec::Language::NodePattern
def shared_group?(param0 = T.unsafe(nil)); end
def spec_group?(param0 = T.unsafe(nil)); end
def subject?(param0 = T.unsafe(nil)); end
-end
-module RuboCop::RSpec::Language::Runners
+ class << self
+ def config; end
+ def config=(_arg0); end
+ end
end
-RuboCop::RSpec::Language::Runners::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-class RuboCop::RSpec::Language::SelectorSet
- def initialize(selectors); end
-
- def +(other); end
- def ==(other); end
- def block_or_block_pass_pattern; end
- def block_pass_pattern; end
- def block_pattern; end
- def include?(selector); end
- def node_pattern; end
- def node_pattern_union; end
- def send_or_block_or_block_pass_pattern; end
- def send_pattern; end
- def to_a; end
-
- protected
-
- def selectors; end
+module RuboCop::RSpec::Language::Helpers
+ class << self
+ def all(element); end
+ end
end
-module RuboCop::RSpec::Language::SharedGroups
+module RuboCop::RSpec::Language::HookScopes
+ class << self
+ def all(element); end
+ end
end
-RuboCop::RSpec::Language::SharedGroups::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::SharedGroups::CONTEXT = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-RuboCop::RSpec::Language::SharedGroups::EXAMPLES = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
-
-module RuboCop::RSpec::Language::Subject
+module RuboCop::RSpec::Language::NodePattern
+ def block_pattern(string); end
+ def send_pattern(string); end
end
-RuboCop::RSpec::Language::Subject::ALL = T.let(T.unsafe(nil), RuboCop::RSpec::Language::SelectorSet)
+module RuboCop::RSpec::Language::Subjects
+ class << self
+ def all(element); end
+ end
+end
module RuboCop::RSpec::Node
def recursive_literal_or_const?; end
end
-module RuboCop::RSpec::TopLevelDescribe
- extend(::RuboCop::AST::NodePattern::Macros)
-
- def on_send(node); end
-
- private
-
- def describe_statement_children(node); end
- def root_node; end
- def single_top_level_describe?; end
- def top_level_describe?(node); end
- def top_level_nodes; end
-end
-
-module RuboCop::RSpec::TopLevelGroup
- include(::RuboCop::RSpec::Language)
- extend(::RuboCop::AST::NodePattern::Macros)
-
- def example_or_shared_group?(param0 = T.unsafe(nil)); end
- def on_new_investigation; end
- def top_level_groups; end
-
- private
-
- def on_top_level_example_group(_node); end
- def on_top_level_group(_node); end
- def root_node; end
- def top_level_group?(node); end
- def top_level_nodes(node); end
-end
-
-module RuboCop::RSpec::Variable
- include(::RuboCop::RSpec::Language)
- extend(::RuboCop::AST::NodePattern::Macros)
-
- def variable_definition?(param0 = T.unsafe(nil)); end
-end
-
module RuboCop::RSpec::Version
end
| true |
Other | Homebrew | brew | e9be4cb83d9c4e58b3894c63eac26fe0034fc96e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.2.0.rbi | @@ -74,7 +74,7 @@ class RuboCop::CLI::Command::Base
class << self
def by_command_name(name); end
def command_name; end
- def command_name=(_); end
+ def command_name=(_arg0); end
def inherited(subclass); end
end
end
@@ -197,10 +197,10 @@ class RuboCop::CommentConfig::CopAnalysis < ::Struct
def start_line_number=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -236,6 +236,7 @@ class RuboCop::Config
def internal?; end
def key?(*args, &block); end
def keys(*args, &block); end
+ def loaded_features; end
def loaded_path; end
def make_excludes_absolute; end
def map(*args, &block); end
@@ -274,10 +275,10 @@ class RuboCop::Config::CopConfig < ::Struct
def name=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -293,31 +294,34 @@ class RuboCop::ConfigLoader
def configuration_file_for(target_dir); end
def configuration_from_file(config_file); end
def debug; end
- def debug=(_); end
+ def debug=(_arg0); end
def debug?; end
def default_configuration; end
- def default_configuration=(_); end
+ def default_configuration=(_arg0); end
def disable_pending_cops; end
- def disable_pending_cops=(_); end
+ def disable_pending_cops=(_arg0); end
def enable_pending_cops; end
- def enable_pending_cops=(_); end
+ def enable_pending_cops=(_arg0); end
def ignore_parent_exclusion; end
- def ignore_parent_exclusion=(_); end
+ def ignore_parent_exclusion=(_arg0); end
def ignore_parent_exclusion?; end
def load_file(file); end
def load_yaml_configuration(absolute_path); end
+ def loaded_features; end
def merge(base_hash, derived_hash); end
def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end
def possible_new_cops?(config); end
def project_root; end
- def project_root=(_); end
+ def project_root=(_arg0); end
def warn_on_pending_cops(pending_cops); end
def warn_pending_cop(cop); end
private
+ def add_loaded_features(loaded_features); end
def check_duplication(yaml_code, absolute_path); end
def expand_path(path); end
+ def file_path(file); end
def find_project_dotfile(target_dir); end
def find_project_root; end
def find_user_dotfile; end
@@ -552,7 +556,7 @@ module RuboCop::Cop::AutocorrectLogic
end
class RuboCop::Cop::Badge
- def initialize(department, cop_name); end
+ def initialize(class_name_parts); end
def ==(other); end
def cop_name; end
@@ -570,12 +574,6 @@ class RuboCop::Cop::Badge
end
end
-class RuboCop::Cop::Badge::InvalidBadge < ::RuboCop::Error
- def initialize(token); end
-end
-
-RuboCop::Cop::Badge::InvalidBadge::MSG = T.let(T.unsafe(nil), String)
-
class RuboCop::Cop::Base
include(::RuboCop::AST::Sexp)
include(::RuboCop::PathUtil)
@@ -589,6 +587,7 @@ class RuboCop::Cop::Base
def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end
def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end
+ def callbacks_needed; end
def config; end
def config_to_allow_offenses; end
def config_to_allow_offenses=(hash); end
@@ -633,6 +632,7 @@ class RuboCop::Cop::Base
class << self
def autocorrect_incompatible_with; end
def badge; end
+ def callbacks_needed; end
def cop_name; end
def department; end
def documentation_url; end
@@ -662,10 +662,10 @@ class RuboCop::Cop::Base::InvestigationReport < ::Struct
def processed_source=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -682,9 +682,10 @@ class RuboCop::Cop::Bundler::DuplicatedGem < ::RuboCop::Cop::Cop
private
- def condition?(nodes); end
+ def conditional_declaration?(nodes); end
def duplicated_gem_nodes; end
def register_offense(node, gem_name, line_of_first_occurrence); end
+ def within_conditional?(node, conditional_node); end
end
RuboCop::Cop::Bundler::DuplicatedGem::MSG = T.let(T.unsafe(nil), String)
@@ -945,9 +946,11 @@ class RuboCop::Cop::Commissioner
private
- def cops_callbacks_for(callback); end
+ def build_callbacks(cops); end
+ def initialize_callbacks; end
def invoke(callback, cops, *args); end
def reset; end
+ def restrict_callbacks(callbacks); end
def restricted_map(callbacks); end
def trigger_responding_cops(callback, node); end
def trigger_restricted_cops(event, node); end
@@ -968,10 +971,10 @@ class RuboCop::Cop::Commissioner::InvestigationReport < ::Struct
def processed_source=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -1075,10 +1078,10 @@ class RuboCop::Cop::Cop::Correction < ::Struct
def node=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -1101,6 +1104,8 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter
end
end
+RuboCop::Cop::Corrector::NOOP_CONSUMER = T.let(T.unsafe(nil), Proc)
+
module RuboCop::Cop::DefNode
extend(::RuboCop::AST::NodePattern::Macros)
@@ -1463,7 +1468,7 @@ class RuboCop::Cop::HashAlignmentStyles::TableAlignment
def hash_rocket_delta(first_pair, current_pair); end
def key_delta(first_pair, current_pair); end
def max_key_width; end
- def max_key_width=(_); end
+ def max_key_width=(_arg0); end
def value_delta(first_pair, current_pair); end
end
@@ -1512,14 +1517,14 @@ class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct
def trailing=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def from_each_with_object(node, match); end
def from_hash_brackets_map(node, match); end
def from_map_to_h(node, match); end
def from_to_h(node, match); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -1534,10 +1539,10 @@ class RuboCop::Cop::HashTransformMethod::Captures < ::Struct
def unchanged_body_expr=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -1801,6 +1806,7 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base
def end_position_for(node); end
def expected_order; end
def find_category(node); end
+ def find_heredoc(node); end
def humanize_node(node); end
def ignore?(classification); end
def source_range_with_comment(node); end
@@ -1953,6 +1959,7 @@ class RuboCop::Cop::Layout::ElseAlignment < ::RuboCop::Cop::Cop
private
+ def assignment_node(node); end
def base_for_method_definition(node); end
def base_range_of_if(node, base); end
def base_range_of_rescue(node); end
@@ -2503,9 +2510,9 @@ class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
def column_deltas; end
- def column_deltas=(_); end
+ def column_deltas=(_arg0); end
def offences_by; end
- def offences_by=(_); end
+ def offences_by=(_arg0); end
def on_hash(node); end
def on_send(node); end
def on_super(node); end
@@ -3100,15 +3107,15 @@ class RuboCop::Cop::Layout::SpaceAroundBlockParameters < ::RuboCop::Cop::Base
def check_after_closing_pipe(arguments); end
def check_arg(arg); end
- def check_closing_pipe_space(args, closing_pipe); end
+ def check_closing_pipe_space(arguments, closing_pipe); end
def check_each_arg(args); end
def check_inside_pipes(arguments); end
def check_no_space(space_begin_pos, space_end_pos, msg); end
- def check_no_space_style_inside_pipes(args, opening_pipe, closing_pipe); end
- def check_opening_pipe_space(args, opening_pipe); end
+ def check_no_space_style_inside_pipes(arguments); end
+ def check_opening_pipe_space(arguments, opening_pipe); end
def check_space(space_begin_pos, space_end_pos, range, msg, node = T.unsafe(nil)); end
- def check_space_style_inside_pipes(args, opening_pipe, closing_pipe); end
- def last_end_pos_inside_pipes(range); end
+ def check_space_style_inside_pipes(arguments); end
+ def last_end_pos_inside_pipes(arguments, range); end
def pipes(arguments); end
def pipes?(arguments); end
def style_parameter_name; end
@@ -3470,8 +3477,10 @@ class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base
def can_be_ignored?(token1, token2); end
def each_extraneous_space(tokens); end
- def each_missing_space(tokens); end
+ def each_extraneous_space_in_empty_parens(token1, token2); end
+ def each_missing_space(token1, token2); end
def parens?(token1, token2); end
+ def process_with_space_style(processed_source); end
def same_line?(token1, token2); end
end
@@ -3579,10 +3588,12 @@ class RuboCop::Cop::Layout::TrailingWhitespace < ::RuboCop::Cop::Base
private
- def extract_heredoc_ranges(ast); end
- def inside_heredoc?(heredoc_ranges, line_number); end
+ def extract_heredocs(ast); end
+ def find_heredoc(line_number); end
def offense_range(lineno, line); end
+ def process_line(line, lineno); end
def skip_heredoc?; end
+ def static?(heredoc); end
end
RuboCop::Cop::Layout::TrailingWhitespace::MSG = T.let(T.unsafe(nil), String)
@@ -3917,6 +3928,21 @@ RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def each_repeated_character_class_element_loc(node); end
+ def on_regexp(node); end
+
+ private
+
+ def interpolation_locs(node); end
+ def within_interpolation?(node, child); end
+end
+
+RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement::MSG_REPEATED_ELEMENT = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Lint::DuplicateRequire < ::RuboCop::Cop::Base
def on_new_investigation; end
def on_send(node); end
@@ -3948,16 +3974,31 @@ RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_if(node); end
private
+ def autocorrect(corrector, node, first_else); end
def check(node); end
def check_else(node); end
end
RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::EmptyBlock < ::RuboCop::Cop::Base
+ def on_block(node); end
+
+ private
+
+ def allow_comment?(node); end
+ def comment_disables_cop?(comment); end
+end
+
+RuboCop::Cop::Lint::EmptyBlock::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base
def on_if(node); end
end
@@ -4279,6 +4320,7 @@ class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base
def autocorrected_value_for_array(node); end
def autocorrected_value_for_string(node); end
def autocorrected_value_for_symbol(node); end
+ def in_array_percent_literal?(node); end
def prints_as_self?(node); end
def special_keyword?(node); end
end
@@ -4296,7 +4338,6 @@ class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base
private
def build_break_line(node); end
- def indent(node); end
def keyword_and_condition_range(node); end
def register_offense(node); end
end
@@ -4406,6 +4447,14 @@ end
RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Cop
+ def on_lvasgn(node); end
+ def on_op_asgn(node); end
+ def on_or_asgn(node); end
+end
+
+RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
@@ -4444,16 +4493,19 @@ end
RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::IgnoredMethods)
extend(::RuboCop::Cop::AutoCorrector)
- def datetime?(param0 = T.unsafe(nil)); end
def on_send(node); end
def to_method(param0 = T.unsafe(nil)); end
private
def correct_method(node, receiver); end
- def date_time_object?(node); end
+ def ignore_receiver?(receiver); end
+ def ignored_class?(name); end
+ def ignored_classes; end
+ def top_receiver(node); end
end
RuboCop::Cop::Lint::NumberConversion::CONVERSION_METHOD_CLASS_MAPPING = T.let(T.unsafe(nil), Hash)
@@ -4478,15 +4530,18 @@ end
RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base
+ def after_send(node); end
def on_match_with_lvasgn(node); end
def on_new_investigation; end
def on_nth_ref(node); end
- def on_send(node); end
def on_when(node); end
private
def check_regexp(node); end
+ def nth_ref_receiver?(send_node); end
+ def regexp_first_argument?(send_node); end
+ def regexp_receiver?(send_node); end
end
RuboCop::Cop::Lint::OutOfRangeRegexpRef::MSG = T.let(T.unsafe(nil), String)
@@ -4594,7 +4649,7 @@ class RuboCop::Cop::Lint::RedundantCopDisableDirective < ::RuboCop::Cop::Base
def initialize(config = T.unsafe(nil), options = T.unsafe(nil), offenses = T.unsafe(nil)); end
def offenses_to_check; end
- def offenses_to_check=(_); end
+ def offenses_to_check=(_arg0); end
def on_new_investigation; end
private
@@ -4996,6 +5051,22 @@ class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base
def beautify_message(message); end
end
+class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base
+ def enum_conversion_call?(param0 = T.unsafe(nil)); end
+ def method_name?(param0 = T.unsafe(nil), param1); end
+ def on_send(node); end
+ def passing_keyword_arg?(param0 = T.unsafe(nil), param1); end
+
+ private
+
+ def argument_match?(send_arg, def_arg); end
+ def arguments_match?(arguments, def_node); end
+end
+
+RuboCop::Cop::Lint::ToEnumArguments::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Lint::ToEnumArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Lint::ToJSON < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
@@ -5051,6 +5122,30 @@ end
RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base
+ def accumulator_index?(param0 = T.unsafe(nil), param1); end
+ def element_modified?(param0, param1); end
+ def expression_values(param0); end
+ def lvar_used?(param0 = T.unsafe(nil), param1); end
+ def on_block(node); end
+ def reduce_with_block?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def acceptable_return?(return_val, element_name); end
+ def allowed_type?(parent_node); end
+ def block_arg_name(node, index); end
+ def check_return_values(block_node); end
+ def potential_offense?(return_values, block_body, element_name, accumulator_name); end
+ def return_values(block_body_node); end
+ def returned_accumulator_index(return_values, accumulator_name); end
+ def returns_accumulator_anywhere?(return_values, accumulator_name); end
+end
+
+RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base
def flow_command?(param0 = T.unsafe(nil)); end
def on_begin(node); end
@@ -5240,6 +5335,8 @@ end
RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_def(node); end
def on_defs(node); end
def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end
@@ -5770,6 +5867,8 @@ RuboCop::Cop::Naming::AsciiIdentifiers::CONSTANT_MSG = T.let(T.unsafe(nil), Stri
RuboCop::Cop::Naming::AsciiIdentifiers::IDENTIFIER_MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Naming::BinaryOperatorParameterName < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
def on_def(node); end
def op_method_candidate?(param0 = T.unsafe(nil)); end
@@ -5854,13 +5953,14 @@ RuboCop::Cop::Naming::FileName::SNAKE_CASE = T.let(T.unsafe(nil), Regexp)
class RuboCop::Cop::Naming::HeredocDelimiterCase < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Heredoc)
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
+ extend(::RuboCop::Cop::AutoCorrector)
def on_heredoc(node); end
private
def correct_case_delimiters?(node); end
- def correct_delimiters(node); end
+ def correct_delimiters(source); end
def message(_node); end
end
@@ -5882,9 +5982,9 @@ RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
- def memoized?(param0 = T.unsafe(nil)); end
- def on_def(node); end
- def on_defs(node); end
+ def defined_memoized?(param0 = T.unsafe(nil), param1); end
+ def on_defined?(node); end
+ def on_or_asgn(node); end
private
@@ -5893,13 +5993,6 @@ class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base
def style_parameter_name; end
def suggested_var(method_name); end
def variable_name_candidates(method_name); end
-
- class << self
-
- private
-
- def node_pattern; end
- end
end
RuboCop::Cop::Naming::MemoizedInstanceVariableName::MSG = T.let(T.unsafe(nil), String)
@@ -5999,8 +6092,11 @@ class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base
def on_arg(node); end
def on_cvasgn(node); end
+ def on_def(node); end
+ def on_defs(node); end
def on_ivasgn(node); end
def on_lvasgn(node); end
+ def on_sym(node); end
private
@@ -6612,6 +6708,30 @@ module RuboCop::Cop::Style::AnnotationComment
def split_comment(comment); end
end
+class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+ extend(::RuboCop::Cop::TargetRubyVersion)
+
+ def forwarding_method_arguments?(param0 = T.unsafe(nil), param1, param2, param3); end
+ def on_def(node); end
+ def on_defs(node); end
+ def only_rest_arguments?(param0 = T.unsafe(nil), param1); end
+ def use_rest_arguments?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def all_lvars_as_forwarding_method_arguments?(def_node, forwarding_method); end
+ def allow_only_rest_arguments?; end
+ def arguments_range(node); end
+ def extract_argument_names_from(args); end
+ def forwarding_method?(node, rest_arg, kwargs, block_arg); end
+ def register_offense_to_forwarding_method_arguments(forwarding_method); end
+ def register_offense_to_method_definition_arguments(method_definition); end
+end
+
+RuboCop::Cop::Style::ArgumentsForwarding::MSG = T.let(T.unsafe(nil), String)
+
class RuboCop::Cop::Style::ArrayCoercion < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
@@ -6723,7 +6843,6 @@ class RuboCop::Cop::Style::BisectedAttrAccessor < ::RuboCop::Cop::Base
def attr_within_visibility_scope?(node, visibility); end
def attr_writer?(send_node); end
def check(macro, reader_names, writer_names); end
- def indent(node); end
def replacement(macro, node); end
def rest_args(args, reader_names, writer_names); end
end
@@ -6848,7 +6967,6 @@ class RuboCop::Cop::Style::CaseLikeIf < ::RuboCop::Cop::Base
def find_target_in_equality_node(node); end
def find_target_in_match_node(node); end
def find_target_in_send_node(node); end
- def indent(node); end
def regexp_with_named_captures?(node); end
def regexp_with_working_captures?(node); end
def should_check?(node); end
@@ -6977,6 +7095,24 @@ RuboCop::Cop::Style::ClassVars::MSG = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_send(node); end
+ def reject_method?(param0 = T.unsafe(nil)); end
+ def select_method?(param0 = T.unsafe(nil)); end
+
+ private
+
+ def good_method_name(method_name); end
+ def offense_range(send_node, block_node); end
+end
+
+RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Style::CollectionCompact::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base
include(::RuboCop::Cop::MethodPreference)
extend(::RuboCop::Cop::AutoCorrector)
@@ -7284,6 +7420,18 @@ end
RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::DocumentDynamicEvalDefinition < ::RuboCop::Cop::Base
+ def on_send(node); end
+
+ private
+
+ def comment_docs?(node); end
+end
+
+RuboCop::Cop::Style::DocumentDynamicEvalDefinition::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Style::DocumentDynamicEvalDefinition::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::Documentation < ::RuboCop::Cop::Base
include(::RuboCop::Cop::Style::AnnotationComment)
include(::RuboCop::Cop::DocumentationComment)
@@ -7334,6 +7482,7 @@ RuboCop::Cop::Style::DoubleCopDisableDirective::MSG = T.let(T.unsafe(nil), Strin
class RuboCop::Cop::Style::DoubleNegation < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
+ extend(::RuboCop::Cop::AutoCorrector)
def double_negative?(param0 = T.unsafe(nil)); end
def on_send(node); end
@@ -7701,6 +7850,9 @@ class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base
private
+ def allowed_unannotated?(detections); end
+ def collect_detections(node); end
+ def max_unannotated_placeholders_allowed; end
def message(detected_style); end
def message_text(style); end
def str_contents(source_map); end
@@ -8114,6 +8266,7 @@ class RuboCop::Cop::Style::KeywordParametersOrder < ::RuboCop::Cop::Base
private
+ def append_newline_to_last_kwoptarg(arguments, corrector); end
def remove_kwargs(kwarg_nodes, corrector); end
end
@@ -8200,11 +8353,14 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
include(::RuboCop::Cop::IgnoredMethods)
include(::RuboCop::Cop::IgnoredPattern)
+ include(::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses)
+ include(::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses)
extend(::RuboCop::Cop::AutoCorrector)
- def initialize(*_); end
-
- def autocorrect(_node); end
+ def on_csend(node); end
+ def on_send(node); end
+ def on_super(node); end
+ def on_yield(node); end
private
@@ -8214,10 +8370,6 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base
end
module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
- def on_csend(node); end
- def on_send(node); end
- def on_super(node); end
- def on_yield(node); end
private
@@ -8237,8 +8389,8 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses
def hash_literal_in_arguments?(node); end
def legitimate_call_with_parentheses?(node); end
def logical_operator?(node); end
- def message(_range = T.unsafe(nil)); end
def offense_range(node); end
+ def omit_parentheses(node); end
def parentheses_at_the_end_of_multiline_call?(node); end
def regexp_slash_literal?(node); end
def splat?(node); end
@@ -8250,17 +8402,13 @@ end
RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp)
module RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses
- def message(_node = T.unsafe(nil)); end
- def on_csend(node); end
- def on_send(node); end
- def on_super(node); end
- def on_yield(node); end
private
def eligible_for_parentheses_omission?(node); end
def ignored_macro?(node); end
def included_macros_list; end
+ def require_parentheses(node); end
end
class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base
@@ -8379,7 +8527,6 @@ class RuboCop::Cop::Style::MixinGrouping < ::RuboCop::Cop::Base
def check_separated_style(send_node); end
def group_mixins(node, mixins); end
def grouped_style?; end
- def indent(node); end
def range_to_remove_for_subsequent_mixin(mixins, node); end
def separate_mixins(node); end
def separated_style?; end
@@ -8527,12 +8674,17 @@ end
RuboCop::Cop::Style::MultilineWhenThen::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_new_investigation; end
def on_or(node); end
- def simple_comparison?(param0 = T.unsafe(nil)); end
+ def simple_comparison_lhs?(param0 = T.unsafe(nil)); end
+ def simple_comparison_rhs?(param0 = T.unsafe(nil)); end
def simple_double_comparison?(param0 = T.unsafe(nil)); end
private
+ def allow_method_comparison?; end
def comparison?(node); end
def nested_comparison?(node); end
def nested_variable_comparison?(node); end
@@ -8583,6 +8735,29 @@ class RuboCop::Cop::Style::NegatedIf < ::RuboCop::Cop::Base
def message(node); end
end
+class RuboCop::Cop::Style::NegatedIfElseCondition < ::RuboCop::Cop::Base
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_if(node); end
+ def on_new_investigation; end
+
+ private
+
+ def correct_negated_condition(corrector, node); end
+ def corrected_ancestor?(node); end
+ def if_else?(node); end
+ def negated_condition?(node); end
+ def swap_branches(corrector, node); end
+
+ class << self
+ def autocorrect_incompatible_with; end
+ end
+end
+
+RuboCop::Cop::Style::NegatedIfElseCondition::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Style::NegatedIfElseCondition::NEGATED_EQUALITY_METHODS = T.let(T.unsafe(nil), Array)
+
class RuboCop::Cop::Style::NegatedUnless < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ConfigurableEnforcedStyle)
include(::RuboCop::Cop::NegativeConditional)
@@ -9121,6 +9296,7 @@ class RuboCop::Cop::Style::RaiseArgs < ::RuboCop::Cop::Base
private
def acceptable_exploded_args?(args); end
+ def allowed_non_exploded_type?(arg); end
def check_compact(node); end
def check_exploded(node); end
def correction_compact_to_exploded(node); end
@@ -9356,6 +9532,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base
def first_send_argument?(param0 = T.unsafe(nil)); end
def first_super_argument?(param0 = T.unsafe(nil)); end
def first_yield_argument?(param0 = T.unsafe(nil)); end
+ def interpolation?(param0 = T.unsafe(nil)); end
def method_node_and_args(param0 = T.unsafe(nil)); end
def on_begin(node); end
def range_end?(param0 = T.unsafe(nil)); end
@@ -9721,6 +9898,7 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base
def method_call(node); end
def method_called?(send_node); end
def negated?(send_node); end
+ def relevant_comment_ranges(node); end
def unsafe_method?(send_node); end
def unsafe_method_used?(method_chain, method); end
end
@@ -9972,12 +10150,14 @@ RuboCop::Cop::Style::StderrPuts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array)
class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base
extend(::RuboCop::Cop::AutoCorrector)
+ def on_new_investigation; end
def on_send(node); end
def string_concatenation?(param0 = T.unsafe(nil)); end
private
def collect_parts(node, parts); end
+ def corrected_ancestor?(node); end
def find_topmost_plus_node(node); end
def plus_node?(node); end
def replacement(parts); end
@@ -10071,6 +10251,33 @@ end
RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String)
+class RuboCop::Cop::Style::SwapValues < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def on_asgn(node); end
+ def on_casgn(node); end
+ def on_cvasgn(node); end
+ def on_gvasgn(node); end
+ def on_ivasgn(node); end
+ def on_lvasgn(node); end
+
+ private
+
+ def allowed_assignment?(node); end
+ def correction_range(tmp_assign, y_assign); end
+ def lhs(node); end
+ def message(x_assign, y_assign); end
+ def replacement(x_assign); end
+ def rhs(node); end
+ def simple_assignment?(node); end
+ def swapping_values?(tmp_assign, x_assign, y_assign); end
+end
+
+RuboCop::Cop::Style::SwapValues::MSG = T.let(T.unsafe(nil), String)
+
+RuboCop::Cop::Style::SwapValues::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Set)
+
class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base
include(::RuboCop::Cop::ArrayMinSize)
include(::RuboCop::Cop::ArraySyntax)
@@ -10089,7 +10296,7 @@ class RuboCop::Cop::Style::SymbolArray < ::RuboCop::Cop::Base
class << self
def largest_brackets; end
- def largest_brackets=(_); end
+ def largest_brackets=(_arg0); end
end
end
@@ -10430,7 +10637,7 @@ class RuboCop::Cop::Style::WordArray < ::RuboCop::Cop::Base
class << self
def largest_brackets; end
- def largest_brackets=(_); end
+ def largest_brackets=(_arg0); end
end
end
@@ -10664,6 +10871,7 @@ module RuboCop::Cop::Util
def double_quotes_required?(string); end
def escape_string(string); end
def first_part_of_call_chain(node); end
+ def indent(node); end
def interpret_string_escapes(string); end
def line_range(node); end
def needs_escaping?(string); end
@@ -10684,6 +10892,7 @@ module RuboCop::Cop::Util
def double_quotes_required?(string); end
def escape_string(string); end
def first_part_of_call_chain(node); end
+ def indent(node); end
def interpret_string_escapes(string); end
def line_range(node); end
def needs_escaping?(string); end
@@ -10827,10 +11036,10 @@ class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct
def node=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -10869,13 +11078,13 @@ class RuboCop::Cop::VariableForce::Branch::Base < ::Struct
def scan_ancestors; end
class << self
- def [](*_); end
+ def [](*_arg0); end
def classes; end
def define_predicate(name, child_index: T.unsafe(nil)); end
def inherited(subclass); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
def type; end
end
end
@@ -11068,10 +11277,10 @@ class RuboCop::Cop::VariableForce::VariableReference < ::Struct
def name=(_); end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -11143,16 +11352,46 @@ module RuboCop::Ext::ProcessedSource
end
module RuboCop::Ext::RegexpNode
+ def assign_properties(*_arg0); end
def each_capture(named: T.unsafe(nil)); end
def parsed_tree; end
private
def with_interpolations_blanked; end
+end
- class << self
- def parsed_cache; end
- end
+module RuboCop::Ext::RegexpParser
+end
+
+module RuboCop::Ext::RegexpParser::Expression
+end
+
+module RuboCop::Ext::RegexpParser::Expression::Base
+ def expression; end
+ def loc; end
+ def origin; end
+ def origin=(_arg0); end
+ def source; end
+ def source=(_arg0); end
+ def start_index; end
+
+ private
+
+ def build_location; end
+end
+
+module RuboCop::Ext::RegexpParser::Expression::CharacterSet
+ def build_location; end
+end
+
+class RuboCop::Ext::RegexpParser::Map < ::Parser::Source::Map
+ def initialize(expression, body:, quantifier: T.unsafe(nil), begin_l: T.unsafe(nil), end_l: T.unsafe(nil)); end
+
+ def begin; end
+ def body; end
+ def end; end
+ def quantifier; end
end
module RuboCop::FileFinder
@@ -11241,9 +11480,9 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo
class << self
def config_to_allow_offenses; end
- def config_to_allow_offenses=(_); end
+ def config_to_allow_offenses=(_arg0); end
def detected_styles; end
- def detected_styles=(_); end
+ def detected_styles=(_arg0); end
end
end
@@ -11294,6 +11533,19 @@ end
RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), String)
+class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter
+ def file_finished(file, offenses); end
+
+ private
+
+ def github_escape(string); end
+ def github_severity(offense); end
+ def minimum_severity_to_fail; end
+ def report_offense(file, offense); end
+end
+
+RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash)
+
class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter
def initialize(output, options = T.unsafe(nil)); end
@@ -11318,10 +11570,10 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct
def to_s; end
class << self
- def [](*_); end
+ def [](*_arg0); end
def inspect; end
def members; end
- def new(*_); end
+ def new(*_arg0); end
end
end
@@ -11402,7 +11654,7 @@ class RuboCop::Formatter::PacmanFormatter < ::RuboCop::Formatter::ClangStyleForm
def next_step(offenses); end
def pacdots(number); end
def progress_line; end
- def progress_line=(_); end
+ def progress_line=(_arg0); end
def started(target_files); end
def step(character); end
def update_progress_line; end
@@ -11733,11 +11985,11 @@ class RuboCop::ResultCache
def cache_root(config_store); end
def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end
def inhibit_cleanup; end
- def inhibit_cleanup=(_); end
+ def inhibit_cleanup=(_arg0); end
def rubocop_required_features; end
- def rubocop_required_features=(_); end
+ def rubocop_required_features=(_arg0); end
def source_checksum; end
- def source_checksum=(_); end
+ def source_checksum=(_arg0); end
private
@@ -11752,7 +12004,7 @@ RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array)
class RuboCop::Runner
def initialize(options, config_store); end
- def aborting=(_); end
+ def aborting=(_arg0); end
def aborting?; end
def errors; end
def run(paths); end
@@ -11913,10 +12165,14 @@ end
module RuboCop::Version
class << self
def document_version; end
- def version(debug: T.unsafe(nil)); end
+ def extension_versions(env); end
+ def feature_version(feature); end
+ def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end
end
end
+RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash)
+
RuboCop::Version::MSG = T.let(T.unsafe(nil), String)
RuboCop::Version::STRING = T.let(T.unsafe(nil), String) | true |
Other | Homebrew | brew | e9be4cb83d9c4e58b3894c63eac26fe0034fc96e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -25838,6 +25838,14 @@ module Readline
def self.completion_quote_character(); end
end
+class Regexp::Expression::Base
+ include ::RuboCop::Ext::RegexpParser::Expression::Base
+end
+
+class Regexp::Expression::CharacterSet
+ include ::RuboCop::Ext::RegexpParser::Expression::CharacterSet
+end
+
class ReporterHub
def empty?(*args, &block); end
end
@@ -26230,12 +26238,9 @@ class RuboCop::AST::NodePattern::Parser
end
module RuboCop::AST::NodePattern::Sets
- SET_AND_RETURN_AND_RAISE_AND_THROW_ETC = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped)
SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped)
SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
- SET_PROC_LAMBDA = ::T.let(nil, ::T.untyped)
- SET_RECEIVE_RECEIVE_MESSAGE_CHAIN = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped)
SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
end | true |
Other | Homebrew | brew | 52de3f9d8d6c5bf6ed193d643c23e35f143c6cd6.json | extract: fix tap regex | Library/Homebrew/dev-cmd/extract.rb | @@ -101,9 +101,9 @@ def extract_args
def extract
args = extract_args.parse
- if args.named.first =~ HOMEBREW_TAP_FORMULA_REGEX
- name = Regexp.last_match(3).downcase
- source_tap = Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))
+ if (match = args.named.first.match(HOMEBREW_TAP_FORMULA_REGEX))
+ name = match[3].downcase
+ source_tap = Tap.fetch(match[1], match[2])
raise TapFormulaUnavailableError.new(source_tap, name) unless source_tap.installed?
else
name = args.named.first.downcase | false |
Other | Homebrew | brew | 8b1aaa957ab95ba229d3c8f9998a1a858f0c5d34.json | rubocop: set Lint/EmptyBlock as rubocop_todo | Library/Homebrew/.rubocop_todo.yml | @@ -22,3 +22,15 @@ Style/Documentation:
- 'utils/popen.rb'
- 'utils/shell.rb'
- 'version.rb'
+
+Lint/EmptyBlock:
+ Exclude:
+ - 'dependency.rb'
+ - 'dev-cmd/extract.rb'
+ - 'test/cache_store_spec.rb'
+ - 'test/checksum_verification_spec.rb'
+ - 'test/compiler_failure_spec.rb'
+ - 'test/formula_spec.rb'
+ - 'test/formula_validation_spec.rb'
+ - 'test/pathname_spec.rb'
+ - 'test/support/fixtures/cask/Casks/*flight*.rb' | false |
Other | Homebrew | brew | 9ad37ddc36c8438db97fdb3e4484d724e06eaffe.json | Revert "uses_from_macos: fix force_homebrew_on_linux behaviour." | Library/Homebrew/extend/os/mac/software_spec.rb | @@ -1,8 +1,6 @@
# typed: false
# frozen_string_literal: true
-# The Library/Homebrew/extend/os/software_spec.rb conditional logic will need to be more nuanced
-# if this file ever includes more than `uses_from_macos`.
class SoftwareSpec
undef uses_from_macos
| true |
Other | Homebrew | brew | 9ad37ddc36c8438db97fdb3e4484d724e06eaffe.json | Revert "uses_from_macos: fix force_homebrew_on_linux behaviour." | Library/Homebrew/extend/os/software_spec.rb | @@ -1,9 +1,8 @@
# typed: strict
# frozen_string_literal: true
-# This logic will need to be more nuanced if this file includes more than `uses_from_macos`.
-if OS.mac? || Homebrew::EnvConfig.force_homebrew_on_linux?
- require "extend/os/mac/software_spec"
-elsif OS.linux?
+if OS.linux?
require "extend/os/linux/software_spec"
+elsif OS.mac?
+ require "extend/os/mac/software_spec"
end | true |
Other | Homebrew | brew | a867e78f62c807b65ff4f80587d1a512252febf0.json | uses_from_macos: fix force_homebrew_on_linux behaviour.
Otherwise the dependencies are read incorrectly on Linux when we're
trying to analyse Homebrew. | Library/Homebrew/extend/os/mac/software_spec.rb | @@ -1,6 +1,8 @@
# typed: false
# frozen_string_literal: true
+# The Library/Homebrew/extend/os/software_spec.rb conditional logic will need to be more nuanced
+# if this file ever includes more than `uses_from_macos`.
class SoftwareSpec
undef uses_from_macos
| true |
Other | Homebrew | brew | a867e78f62c807b65ff4f80587d1a512252febf0.json | uses_from_macos: fix force_homebrew_on_linux behaviour.
Otherwise the dependencies are read incorrectly on Linux when we're
trying to analyse Homebrew. | Library/Homebrew/extend/os/software_spec.rb | @@ -1,8 +1,9 @@
# typed: strict
# frozen_string_literal: true
-if OS.linux?
- require "extend/os/linux/software_spec"
-elsif OS.mac?
+# This logic will need to be more nuanced if this file includes more than `uses_from_macos`.
+if OS.mac? || Homebrew::EnvConfig.force_homebrew_on_linux?
require "extend/os/mac/software_spec"
+elsif OS.linux?
+ require "extend/os/linux/software_spec"
end | true |
Other | Homebrew | brew | 4ae72e0bdfeab8258da4caf4103f75ec14c8b09c.json | tap: add constants for json files | Library/Homebrew/dev-cmd/audit.rb | @@ -1190,14 +1190,8 @@ def audit
audit_tap_audit_exceptions
end
- HOMEBREW_TAP_JSON_FILES = %w[
- formula_renames.json
- tap_migrations.json
- audit_exceptions/*.json
- ].freeze
-
def audit_json_files
- json_patterns = HOMEBREW_TAP_JSON_FILES.map { |pattern| @path/pattern }
+ json_patterns = Tap::HOMEBREW_TAP_JSON_FILES.map { |pattern| @path/pattern }
Pathname.glob(json_patterns).each do |file|
JSON.parse file.read
rescue JSON::ParserError | true |
Other | Homebrew | brew | 4ae72e0bdfeab8258da4caf4103f75ec14c8b09c.json | tap: add constants for json files | Library/Homebrew/tap.rb | @@ -16,6 +16,16 @@ class Tap
TAP_DIRECTORY = (HOMEBREW_LIBRARY/"Taps").freeze
+ HOMEBREW_TAP_FORMULA_RENAMES_FILE = "formula_renames.json"
+ HOMEBREW_TAP_MIGRATIONS_FILE = "tap_migrations.json"
+ HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR = "audit_exceptions"
+
+ HOMEBREW_TAP_JSON_FILES = %W[
+ #{HOMEBREW_TAP_FORMULA_RENAMES_FILE}
+ #{HOMEBREW_TAP_MIGRATIONS_FILE}
+ #{HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR}/*.json
+ ].freeze
+
def self.fetch(*args)
case args.length
when 1
@@ -526,7 +536,7 @@ def to_hash
# Hash with tap formula renames
def formula_renames
- @formula_renames ||= if (rename_file = path/"formula_renames.json").file?
+ @formula_renames ||= if (rename_file = path/HOMEBREW_TAP_FORMULA_RENAMES_FILE).file?
JSON.parse(rename_file.read)
else
{}
@@ -535,7 +545,7 @@ def formula_renames
# Hash with tap migrations
def tap_migrations
- @tap_migrations ||= if (migration_file = path/"tap_migrations.json").file?
+ @tap_migrations ||= if (migration_file = path/HOMEBREW_TAP_MIGRATIONS_FILE).file?
JSON.parse(migration_file.read)
else
{}
@@ -546,7 +556,7 @@ def tap_migrations
def audit_exceptions
@audit_exceptions = {}
- Pathname.glob(path/"audit_exceptions/*").each do |exception_file|
+ Pathname.glob(path/HOMEBREW_TAP_AUDIT_EXCEPTIONS_DIR/"*").each do |exception_file|
list_name = exception_file.basename.to_s.chomp(".json").to_sym
list_contents = begin
JSON.parse exception_file.read | true |
Other | Homebrew | brew | 9057a630212d95b57e7ee5492f7662a2340ff288.json | dev-cmd/pr-upload: run `brew audit` before uploading.
Check that `brew bottle --merge --write` hasn't broken `brew audit`. | Library/Homebrew/dev-cmd/pr-upload.rb | @@ -87,6 +87,14 @@ def pr_upload
safe_system HOMEBREW_BREW_FILE, *bottle_args
+ # Check the bottle commits did not break `brew audit`
+ unless args.no_commit?
+ audit_args = ["bottle", "--merge", "--write"]
+ audit_args << "--verbose" if args.verbose?
+ audit_args << "--debug" if args.debug?
+ safe_system HOMEBREW_BREW_FILE, *audit_args
+ end
+
if github_releases?(bottles_hash)
# Handle uploading to GitHub Releases.
bottles_hash.each_value do |bottle_hash| | false |
Other | Homebrew | brew | d73a0e3040d3b59ef3711a3e2cf405c28a463b11.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5523,6 +5523,8 @@ class Cask::Cask
def dictionary(&block); end
+ def discontinued?(&block); end
+
def font(&block); end
def homepage(&block); end
@@ -5715,6 +5717,8 @@ class Cask::DSL::Caveats
def discontinued(*args); end
+ def discontinued?(); end
+
def files_in_usr_local(*args); end
def free_license(*args); end | false |
Other | Homebrew | brew | b4d4f6d50422107ef79c5b976bed891915d5ef2e.json | audit: require JSON arrays/objects for audit exceptions | Library/Homebrew/dev-cmd/audit.rb | @@ -1207,6 +1207,14 @@ def audit_json_files
def audit_tap_audit_exceptions
@tap_audit_exceptions.each do |list_name, formula_names|
+ unless [Hash, Array].include? formula_names.class
+ problem <<~EOS
+ audit_exceptions/#{list_name}.json should contain a JSON array
+ of formula names or a JSON object mapping formula names to values
+ EOS
+ next
+ end
+
formula_names = formula_names.keys if formula_names.is_a? Hash
invalid_formulae = [] | false |
Other | Homebrew | brew | 6b27dcb11ce2a353c73ea7fd771b960899702736.json | workflows/tests: use Big Sur.
Migrate GitHub Actions to Big Sur. | .github/workflows/tests.yml | @@ -6,18 +6,21 @@ on:
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
+ HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING: 1 # TODO: remove when Big Sur is released.
jobs:
tests:
if: github.repository == 'Homebrew/brew'
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, macOS-latest]
+ os: [ubuntu-latest, macOS-latest, macOS-11.0]
include:
- os: ubuntu-latest
core-tap: 'linuxbrew-core'
- os: macOS-latest
core-tap: 'homebrew-core'
+ - os: macOS-11.0
+ core-tap: 'homebrew-core'
steps:
- name: Set up Homebrew
id: set-up-homebrew
@@ -30,6 +33,10 @@ jobs:
- run: brew test-bot --only-cleanup-before
+ - name: Set up Xcode
+ if: matrix.os == 'macOS-11.0'
+ run: sudo xcode-select --switch /Applications/Xcode_12.2.app/Contents/Developer
+
- run: brew config
# Can't cache this because we need to check that it doesn't fail the
@@ -60,7 +67,7 @@ jobs:
run: brew man --fail-if-changed
- name: Install brew tests dependencies
- if: matrix.os == 'macOS-latest'
+ if: matrix.os != 'ubuntu-latest'
run: |
brew install subversion
Library/Homebrew/shims/scm/svn --homebrew=print-path
@@ -108,7 +115,7 @@ jobs:
run: brew style --display-cop-names homebrew/bundle homebrew/services homebrew/test-bot
- name: Run brew cask style on all taps
- if: matrix.os == 'macOS-latest'
+ if: matrix.os != 'ubuntu-latest'
run: |
brew tap homebrew/cask
brew tap homebrew/cask-drivers | true |
Other | Homebrew | brew | 6b27dcb11ce2a353c73ea7fd771b960899702736.json | workflows/tests: use Big Sur.
Migrate GitHub Actions to Big Sur. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -93,6 +93,9 @@ def check_for_non_prefixed_findutils
def check_for_unsupported_macos
return if Homebrew::EnvConfig.developer?
+ # TODO: remove when Big Sur is released.
+ return if MacOS.version == :big_sur && ENV["HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING"]
+
who = +"We"
if OS::Mac.prerelease?
what = "pre-release version" | true |
Other | Homebrew | brew | 6b27dcb11ce2a353c73ea7fd771b960899702736.json | workflows/tests: use Big Sur.
Migrate GitHub Actions to Big Sur. | Library/Homebrew/test/os/mac/diagnostic_spec.rb | @@ -6,6 +6,7 @@
describe Homebrew::Diagnostic::Checks do
specify "#check_for_unsupported_macos" do
ENV.delete("HOMEBREW_DEVELOPER")
+ allow(OS::Mac).to receive(:version).and_return(OS::Mac::Version.new("10.14"))
allow(OS::Mac).to receive(:prerelease?).and_return(true)
expect(subject.check_for_unsupported_macos) | true |
Other | Homebrew | brew | 6b27dcb11ce2a353c73ea7fd771b960899702736.json | workflows/tests: use Big Sur.
Migrate GitHub Actions to Big Sur. | Library/Homebrew/test/spec_helper.rb | @@ -109,7 +109,7 @@
config.before(:each, :needs_java) do
java_installed = if OS.mac?
- Utils.popen_read("/usr/libexec/java_home", "--failfast")
+ Utils.popen_read("/usr/libexec/java_home", "--failfast", "--version", "1.0+")
$CHILD_STATUS.success?
else
which("java") | true |
Other | Homebrew | brew | 763e761a200cb9ddd839c0351ceb7221e719f80e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -2980,6 +2980,10 @@ end
BasicObject::BasicObject = BasicObject
+class BasicSocket
+ def read_nonblock(len, str=T.unsafe(nil), exception: T.unsafe(nil)); end
+end
+
class Benchmark::Job
def initialize(width); end
end
@@ -5578,10 +5582,6 @@ class Cask::Cask
def zap(&block); end
end
-class Cask::Cmd::AbstractCommand
- include ::Homebrew::Search::Extension
-end
-
class Cask::Config
def appdir(); end
@@ -6721,10 +6721,6 @@ module DependenciesHelpers
include ::DependenciesHelpers::Compat
end
-class Descriptions
- extend ::Homebrew::Search::Extension
-end
-
class Dir
def children(); end
@@ -6979,81 +6975,37 @@ class Enumerator::Generator
def initialize(*_); end
end
-class Errno::EAUTH
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EAUTH
-end
-
-class Errno::EBADARCH
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EBADARCH
-end
-
-class Errno::EBADEXEC
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EAUTH = Errno::NOERROR
-class Errno::EBADEXEC
-end
+Errno::EBADARCH = Errno::NOERROR
-class Errno::EBADMACHO
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EBADEXEC = Errno::NOERROR
-class Errno::EBADMACHO
-end
+Errno::EBADMACHO = Errno::NOERROR
-class Errno::EBADRPC
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EBADRPC = Errno::NOERROR
-class Errno::EBADRPC
-end
+Errno::ECAPMODE = Errno::NOERROR
-Errno::EDEADLOCK = Errno::NOERROR
+Errno::EDEADLOCK = Errno::EDEADLK
-class Errno::EDEVERR
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EDEVERR
-end
+Errno::EDEVERR = Errno::NOERROR
Errno::EDOOFUS = Errno::NOERROR
-class Errno::EFTYPE
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EFTYPE
-end
+Errno::EFTYPE = Errno::NOERROR
Errno::EIPSEC = Errno::NOERROR
-class Errno::ENEEDAUTH
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ELAST = Errno::NOERROR
-class Errno::ENEEDAUTH
-end
+Errno::ENEEDAUTH = Errno::NOERROR
-class Errno::ENOATTR
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ENOATTR = Errno::NOERROR
-class Errno::ENOATTR
-end
+Errno::ENOPOLICY = Errno::NOERROR
-class Errno::ENOPOLICY
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::ENOPOLICY
-end
+Errno::ENOTCAPABLE = Errno::NOERROR
class Errno::ENOTSUP
Errno = ::T.let(nil, ::T.untyped)
@@ -7062,61 +7014,21 @@ end
class Errno::ENOTSUP
end
-class Errno::EPROCLIM
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROCLIM
-end
-
-class Errno::EPROCUNAVAIL
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROCUNAVAIL
-end
-
-class Errno::EPROGMISMATCH
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROGMISMATCH
-end
-
-class Errno::EPROGUNAVAIL
- Errno = ::T.let(nil, ::T.untyped)
-end
-
-class Errno::EPROGUNAVAIL
-end
+Errno::EPROCLIM = Errno::NOERROR
-class Errno::EPWROFF
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EPROCUNAVAIL = Errno::NOERROR
-class Errno::EPWROFF
-end
+Errno::EPROGMISMATCH = Errno::NOERROR
-class Errno::EQFULL
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EPROGUNAVAIL = Errno::NOERROR
-class Errno::EQFULL
-end
+Errno::EPWROFF = Errno::NOERROR
-class Errno::ERPCMISMATCH
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::EQFULL = Errno::NOERROR
-class Errno::ERPCMISMATCH
-end
-
-class Errno::ESHLIBVERS
- Errno = ::T.let(nil, ::T.untyped)
-end
+Errno::ERPCMISMATCH = Errno::NOERROR
-class Errno::ESHLIBVERS
-end
+Errno::ESHLIBVERS = Errno::NOERROR
class Etc::Group
def gid(); end
@@ -7146,16 +7058,8 @@ class Etc::Group
end
class Etc::Passwd
- def change(); end
-
- def change=(_); end
-
def dir=(_); end
- def expire(); end
-
- def expire=(_); end
-
def gecos(); end
def gecos=(_); end
@@ -7168,10 +7072,6 @@ class Etc::Passwd
def shell=(_); end
- def uclass(); end
-
- def uclass=(_); end
-
def uid=(_); end
end
@@ -7267,6 +7167,10 @@ module Fiddle
WINDOWS = ::T.let(nil, ::T.untyped)
end
+class Fiddle::Function
+ STDCALL = ::T.let(nil, ::T.untyped)
+end
+
class File
def self.atomic_write(file_name, temp_dir=T.unsafe(nil)); end
@@ -7524,15 +7428,6 @@ class Gem::Ext::ExtConfBuilder
def self.get_relative_path(path); end
end
-class Gem::NoAliasYAMLTree
- def register(target, obj); end
-
- def visit_String(str); end
-end
-
-class Gem::NoAliasYAMLTree
-end
-
class Gem::Package::DigestIO
def digests(); end
@@ -7779,17 +7674,6 @@ end
class Gem::RuntimeRequirementNotMetError
end
-module Gem::SafeYAML
- PERMITTED_CLASSES = ::T.let(nil, ::T.untyped)
- PERMITTED_SYMBOLS = ::T.let(nil, ::T.untyped)
-end
-
-module Gem::SafeYAML
- def self.load(input); end
-
- def self.safe_load(input); end
-end
-
class Gem::Security::Exception
end
@@ -8044,8 +7928,6 @@ class Gem::StubSpecification
def self.gemspec_stub(filename, base_dir, gems_dir); end
end
-Gem::SyckDefaultKey = Psych::Syck::DefaultKey
-
class Gem::UninstallError
def spec(); end
@@ -8317,13 +8199,8 @@ module Homebrew::MissingFormula
extend ::T::Private::Methods::SingletonMethodHooks
end
-module Homebrew::Search
- include ::Homebrew::Search::Extension
-end
-
module Homebrew
extend ::FileUtils::StreamUtils_
- extend ::Homebrew::Search::Extension
extend ::DependenciesHelpers::Compat
def self.default_prefix?(prefix=T.unsafe(nil)); end
end
@@ -13494,7 +13371,6 @@ class Object
def to_query(key); end
def to_yaml(options=T.unsafe(nil)); end
- APPLE_GEM_HOME = ::T.let(nil, ::T.untyped)
APPLY_A = ::T.let(nil, ::T.untyped)
APPLY_B = ::T.let(nil, ::T.untyped)
APPLY_C = ::T.let(nil, ::T.untyped)
@@ -13567,8 +13443,6 @@ class Object
RUBY_DESCRIPTION = ::T.let(nil, ::T.untyped)
RUBY_ENGINE = ::T.let(nil, ::T.untyped)
RUBY_ENGINE_VERSION = ::T.let(nil, ::T.untyped)
- RUBY_FRAMEWORK = ::T.let(nil, ::T.untyped)
- RUBY_FRAMEWORK_VERSION = ::T.let(nil, ::T.untyped)
RUBY_PATCHLEVEL = ::T.let(nil, ::T.untyped)
RUBY_PATH = ::T.let(nil, ::T.untyped)
RUBY_PLATFORM = ::T.let(nil, ::T.untyped)
@@ -13629,7 +13503,11 @@ class OpenSSL::KDF::KDFError
end
module OpenSSL::KDF
+ def self.hkdf(*_); end
+
def self.pbkdf2_hmac(*_); end
+
+ def self.scrypt(*_); end
end
class OpenSSL::OCSP::Request
@@ -13638,20 +13516,29 @@ end
OpenSSL::PKCS7::Signer = OpenSSL::PKCS7::SignerInfo
+class OpenSSL::PKey::EC
+ EXPLICIT_CURVE = ::T.let(nil, ::T.untyped)
+end
+
class OpenSSL::PKey::EC::Point
def to_octet_string(_); end
end
module OpenSSL::SSL
+ OP_ALLOW_NO_DHE_KEX = ::T.let(nil, ::T.untyped)
OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = ::T.let(nil, ::T.untyped)
OP_CRYPTOPRO_TLSEXT_BUG = ::T.let(nil, ::T.untyped)
OP_LEGACY_SERVER_CONNECT = ::T.let(nil, ::T.untyped)
+ OP_NO_ENCRYPT_THEN_MAC = ::T.let(nil, ::T.untyped)
+ OP_NO_RENEGOTIATION = ::T.let(nil, ::T.untyped)
+ OP_NO_TLSv1_3 = ::T.let(nil, ::T.untyped)
OP_SAFARI_ECDHE_ECDSA_BUG = ::T.let(nil, ::T.untyped)
OP_TLSEXT_PADDING = ::T.let(nil, ::T.untyped)
SSL2_VERSION = ::T.let(nil, ::T.untyped)
SSL3_VERSION = ::T.let(nil, ::T.untyped)
TLS1_1_VERSION = ::T.let(nil, ::T.untyped)
TLS1_2_VERSION = ::T.let(nil, ::T.untyped)
+ TLS1_3_VERSION = ::T.let(nil, ::T.untyped)
TLS1_VERSION = ::T.let(nil, ::T.untyped)
end
@@ -13666,6 +13553,8 @@ class OpenSSL::SSL::SSLContext
def alpn_select_cb=(alpn_select_cb); end
+ def enable_fallback_scsv(); end
+
def max_version=(version); end
def min_version=(version); end
@@ -15246,8 +15135,8 @@ class Parser::Ruby26
end
class Pathname
- include ::MachOShim
include ::ELFShim
+ include ::MachOShim
def fnmatch?(*_); end
def glob(*_); end
@@ -18562,24 +18451,6 @@ module Psych
VERSION = ::T.let(nil, ::T.untyped)
end
-class Psych::PrivateType
-end
-
-class Psych::PrivateType
-end
-
-module Psych::Syck
-end
-
-class Psych::Syck::DefaultKey
-end
-
-class Psych::Syck::DefaultKey
-end
-
-module Psych::Syck
-end
-
module Psych
def self.add_builtin_type(type_tag, &block); end
@@ -28403,188 +28274,6 @@ module Singleton
def self.__init__(klass); end
end
-class Socket
- AF_CCITT = ::T.let(nil, ::T.untyped)
- AF_CHAOS = ::T.let(nil, ::T.untyped)
- AF_CNT = ::T.let(nil, ::T.untyped)
- AF_COIP = ::T.let(nil, ::T.untyped)
- AF_DATAKIT = ::T.let(nil, ::T.untyped)
- AF_DLI = ::T.let(nil, ::T.untyped)
- AF_E164 = ::T.let(nil, ::T.untyped)
- AF_ECMA = ::T.let(nil, ::T.untyped)
- AF_HYLINK = ::T.let(nil, ::T.untyped)
- AF_IMPLINK = ::T.let(nil, ::T.untyped)
- AF_ISO = ::T.let(nil, ::T.untyped)
- AF_LAT = ::T.let(nil, ::T.untyped)
- AF_LINK = ::T.let(nil, ::T.untyped)
- AF_NATM = ::T.let(nil, ::T.untyped)
- AF_NDRV = ::T.let(nil, ::T.untyped)
- AF_NETBIOS = ::T.let(nil, ::T.untyped)
- AF_NS = ::T.let(nil, ::T.untyped)
- AF_OSI = ::T.let(nil, ::T.untyped)
- AF_PPP = ::T.let(nil, ::T.untyped)
- AF_PUP = ::T.let(nil, ::T.untyped)
- AF_SIP = ::T.let(nil, ::T.untyped)
- AF_SYSTEM = ::T.let(nil, ::T.untyped)
- AI_DEFAULT = ::T.let(nil, ::T.untyped)
- AI_MASK = ::T.let(nil, ::T.untyped)
- AI_V4MAPPED_CFG = ::T.let(nil, ::T.untyped)
- EAI_BADHINTS = ::T.let(nil, ::T.untyped)
- EAI_MAX = ::T.let(nil, ::T.untyped)
- EAI_PROTOCOL = ::T.let(nil, ::T.untyped)
- IFF_ALTPHYS = ::T.let(nil, ::T.untyped)
- IFF_LINK0 = ::T.let(nil, ::T.untyped)
- IFF_LINK1 = ::T.let(nil, ::T.untyped)
- IFF_LINK2 = ::T.let(nil, ::T.untyped)
- IFF_OACTIVE = ::T.let(nil, ::T.untyped)
- IFF_SIMPLEX = ::T.let(nil, ::T.untyped)
- IPPROTO_EON = ::T.let(nil, ::T.untyped)
- IPPROTO_GGP = ::T.let(nil, ::T.untyped)
- IPPROTO_HELLO = ::T.let(nil, ::T.untyped)
- IPPROTO_MAX = ::T.let(nil, ::T.untyped)
- IPPROTO_ND = ::T.let(nil, ::T.untyped)
- IPPROTO_XTP = ::T.let(nil, ::T.untyped)
- IPV6_DONTFRAG = ::T.let(nil, ::T.untyped)
- IPV6_PATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_RECVPATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_USE_MIN_MTU = ::T.let(nil, ::T.untyped)
- IP_PORTRANGE = ::T.let(nil, ::T.untyped)
- IP_RECVDSTADDR = ::T.let(nil, ::T.untyped)
- IP_RECVIF = ::T.let(nil, ::T.untyped)
- LOCAL_PEERCRED = ::T.let(nil, ::T.untyped)
- MSG_EOF = ::T.let(nil, ::T.untyped)
- MSG_FLUSH = ::T.let(nil, ::T.untyped)
- MSG_HAVEMORE = ::T.let(nil, ::T.untyped)
- MSG_HOLD = ::T.let(nil, ::T.untyped)
- MSG_RCVMORE = ::T.let(nil, ::T.untyped)
- MSG_SEND = ::T.let(nil, ::T.untyped)
- PF_CCITT = ::T.let(nil, ::T.untyped)
- PF_CHAOS = ::T.let(nil, ::T.untyped)
- PF_CNT = ::T.let(nil, ::T.untyped)
- PF_COIP = ::T.let(nil, ::T.untyped)
- PF_DATAKIT = ::T.let(nil, ::T.untyped)
- PF_DLI = ::T.let(nil, ::T.untyped)
- PF_ECMA = ::T.let(nil, ::T.untyped)
- PF_HYLINK = ::T.let(nil, ::T.untyped)
- PF_IMPLINK = ::T.let(nil, ::T.untyped)
- PF_ISO = ::T.let(nil, ::T.untyped)
- PF_LAT = ::T.let(nil, ::T.untyped)
- PF_LINK = ::T.let(nil, ::T.untyped)
- PF_NATM = ::T.let(nil, ::T.untyped)
- PF_NDRV = ::T.let(nil, ::T.untyped)
- PF_NETBIOS = ::T.let(nil, ::T.untyped)
- PF_NS = ::T.let(nil, ::T.untyped)
- PF_OSI = ::T.let(nil, ::T.untyped)
- PF_PIP = ::T.let(nil, ::T.untyped)
- PF_PPP = ::T.let(nil, ::T.untyped)
- PF_PUP = ::T.let(nil, ::T.untyped)
- PF_RTIP = ::T.let(nil, ::T.untyped)
- PF_SIP = ::T.let(nil, ::T.untyped)
- PF_SYSTEM = ::T.let(nil, ::T.untyped)
- PF_XTP = ::T.let(nil, ::T.untyped)
- SCM_CREDS = ::T.let(nil, ::T.untyped)
- SO_DONTTRUNC = ::T.let(nil, ::T.untyped)
- SO_NKE = ::T.let(nil, ::T.untyped)
- SO_NOSIGPIPE = ::T.let(nil, ::T.untyped)
- SO_NREAD = ::T.let(nil, ::T.untyped)
- SO_USELOOPBACK = ::T.let(nil, ::T.untyped)
- SO_WANTMORE = ::T.let(nil, ::T.untyped)
- SO_WANTOOBFLAG = ::T.let(nil, ::T.untyped)
- TCP_NOOPT = ::T.let(nil, ::T.untyped)
- TCP_NOPUSH = ::T.let(nil, ::T.untyped)
-end
-
-module Socket::Constants
- AF_CCITT = ::T.let(nil, ::T.untyped)
- AF_CHAOS = ::T.let(nil, ::T.untyped)
- AF_CNT = ::T.let(nil, ::T.untyped)
- AF_COIP = ::T.let(nil, ::T.untyped)
- AF_DATAKIT = ::T.let(nil, ::T.untyped)
- AF_DLI = ::T.let(nil, ::T.untyped)
- AF_E164 = ::T.let(nil, ::T.untyped)
- AF_ECMA = ::T.let(nil, ::T.untyped)
- AF_HYLINK = ::T.let(nil, ::T.untyped)
- AF_IMPLINK = ::T.let(nil, ::T.untyped)
- AF_ISO = ::T.let(nil, ::T.untyped)
- AF_LAT = ::T.let(nil, ::T.untyped)
- AF_LINK = ::T.let(nil, ::T.untyped)
- AF_NATM = ::T.let(nil, ::T.untyped)
- AF_NDRV = ::T.let(nil, ::T.untyped)
- AF_NETBIOS = ::T.let(nil, ::T.untyped)
- AF_NS = ::T.let(nil, ::T.untyped)
- AF_OSI = ::T.let(nil, ::T.untyped)
- AF_PPP = ::T.let(nil, ::T.untyped)
- AF_PUP = ::T.let(nil, ::T.untyped)
- AF_SIP = ::T.let(nil, ::T.untyped)
- AF_SYSTEM = ::T.let(nil, ::T.untyped)
- AI_DEFAULT = ::T.let(nil, ::T.untyped)
- AI_MASK = ::T.let(nil, ::T.untyped)
- AI_V4MAPPED_CFG = ::T.let(nil, ::T.untyped)
- EAI_BADHINTS = ::T.let(nil, ::T.untyped)
- EAI_MAX = ::T.let(nil, ::T.untyped)
- EAI_PROTOCOL = ::T.let(nil, ::T.untyped)
- IFF_ALTPHYS = ::T.let(nil, ::T.untyped)
- IFF_LINK0 = ::T.let(nil, ::T.untyped)
- IFF_LINK1 = ::T.let(nil, ::T.untyped)
- IFF_LINK2 = ::T.let(nil, ::T.untyped)
- IFF_OACTIVE = ::T.let(nil, ::T.untyped)
- IFF_SIMPLEX = ::T.let(nil, ::T.untyped)
- IPPROTO_EON = ::T.let(nil, ::T.untyped)
- IPPROTO_GGP = ::T.let(nil, ::T.untyped)
- IPPROTO_HELLO = ::T.let(nil, ::T.untyped)
- IPPROTO_MAX = ::T.let(nil, ::T.untyped)
- IPPROTO_ND = ::T.let(nil, ::T.untyped)
- IPPROTO_XTP = ::T.let(nil, ::T.untyped)
- IPV6_DONTFRAG = ::T.let(nil, ::T.untyped)
- IPV6_PATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_RECVPATHMTU = ::T.let(nil, ::T.untyped)
- IPV6_USE_MIN_MTU = ::T.let(nil, ::T.untyped)
- IP_PORTRANGE = ::T.let(nil, ::T.untyped)
- IP_RECVDSTADDR = ::T.let(nil, ::T.untyped)
- IP_RECVIF = ::T.let(nil, ::T.untyped)
- LOCAL_PEERCRED = ::T.let(nil, ::T.untyped)
- MSG_EOF = ::T.let(nil, ::T.untyped)
- MSG_FLUSH = ::T.let(nil, ::T.untyped)
- MSG_HAVEMORE = ::T.let(nil, ::T.untyped)
- MSG_HOLD = ::T.let(nil, ::T.untyped)
- MSG_RCVMORE = ::T.let(nil, ::T.untyped)
- MSG_SEND = ::T.let(nil, ::T.untyped)
- PF_CCITT = ::T.let(nil, ::T.untyped)
- PF_CHAOS = ::T.let(nil, ::T.untyped)
- PF_CNT = ::T.let(nil, ::T.untyped)
- PF_COIP = ::T.let(nil, ::T.untyped)
- PF_DATAKIT = ::T.let(nil, ::T.untyped)
- PF_DLI = ::T.let(nil, ::T.untyped)
- PF_ECMA = ::T.let(nil, ::T.untyped)
- PF_HYLINK = ::T.let(nil, ::T.untyped)
- PF_IMPLINK = ::T.let(nil, ::T.untyped)
- PF_ISO = ::T.let(nil, ::T.untyped)
- PF_LAT = ::T.let(nil, ::T.untyped)
- PF_LINK = ::T.let(nil, ::T.untyped)
- PF_NATM = ::T.let(nil, ::T.untyped)
- PF_NDRV = ::T.let(nil, ::T.untyped)
- PF_NETBIOS = ::T.let(nil, ::T.untyped)
- PF_NS = ::T.let(nil, ::T.untyped)
- PF_OSI = ::T.let(nil, ::T.untyped)
- PF_PIP = ::T.let(nil, ::T.untyped)
- PF_PPP = ::T.let(nil, ::T.untyped)
- PF_PUP = ::T.let(nil, ::T.untyped)
- PF_RTIP = ::T.let(nil, ::T.untyped)
- PF_SIP = ::T.let(nil, ::T.untyped)
- PF_SYSTEM = ::T.let(nil, ::T.untyped)
- PF_XTP = ::T.let(nil, ::T.untyped)
- SCM_CREDS = ::T.let(nil, ::T.untyped)
- SO_DONTTRUNC = ::T.let(nil, ::T.untyped)
- SO_NKE = ::T.let(nil, ::T.untyped)
- SO_NOSIGPIPE = ::T.let(nil, ::T.untyped)
- SO_NREAD = ::T.let(nil, ::T.untyped)
- SO_USELOOPBACK = ::T.let(nil, ::T.untyped)
- SO_WANTMORE = ::T.let(nil, ::T.untyped)
- SO_WANTOOBFLAG = ::T.let(nil, ::T.untyped)
- TCP_NOOPT = ::T.let(nil, ::T.untyped)
- TCP_NOPUSH = ::T.let(nil, ::T.untyped)
-end
-
class SoftwareSpec
def cached_download(*args, &block); end
@@ -28967,8 +28656,6 @@ module Superenv
def Os(); end
end
-Syck = Psych::Syck
-
class SynchronizedDelegator
def method_missing(method, *args, &block); end
| false |
Other | Homebrew | brew | 027419effe57b424eb76ca2151e7effa26e33c8c.json | test/language/node: add test for prepare/prepack removal | Library/Homebrew/test/language/node_spec.rb | @@ -24,6 +24,20 @@
end
end
+ describe "#std_pack_for_installation" do
+ npm_pack_cmd = "npm pack --ignore-scripts"
+
+ it "removes prepare and prepack scripts" do
+ path = Pathname("package.json")
+ path.atomic_write("{\"scripts\":{\"prepare\": \"ls\", \"prepack\": \"ls\", \"test\": \"ls\"}}")
+ allow(Utils).to receive(:popen_read).with(npm_pack_cmd).and_return(`echo pack.tgz`)
+ subject.pack_for_installation
+ expect(path.read).not_to include("prepare")
+ expect(path.read).not_to include("prepack")
+ expect(path.read).to include("test")
+ end
+ end
+
describe "#std_npm_install_args" do
npm_install_arg = Pathname("libexec")
npm_pack_cmd = "npm pack --ignore-scripts" | false |
Other | Homebrew | brew | c062429dddebf52f1cf218b190d00a3a34d2f7d1.json | language/node: remove unneeded scripts prior to installation | Library/Homebrew/language/node.rb | @@ -16,6 +16,17 @@ def self.pack_for_installation
# fed to `npm install` only symlinks are created linking back to that
# directory, consequently breaking that assumption. We require a tarball
# because npm install creates a "real" installation when fed a tarball.
+ if (package = Pathname("package.json")) && package.exist?
+ begin
+ pkg_json = JSON.parse(package.read)
+ rescue JSON::ParserError
+ $stderr.puts "Could not parse package.json"
+ raise
+ end
+ prepare_removed = pkg_json["scripts"]&.delete("prepare")
+ prepack_removed = pkg_json["scripts"]&.delete("prepack")
+ package.atomic_write(JSON.pretty_generate(pkg_json)) if prepare_removed || prepack_removed
+ end
output = Utils.popen_read("npm pack --ignore-scripts")
raise "npm failed to pack #{Dir.pwd}" if !$CHILD_STATUS.exitstatus.zero? || output.lines.empty?
| false |
Other | Homebrew | brew | 2a941ec6b17bcb0d9557cf3604d64a3954cc199e.json | audit, tap: incorporate suggestions from code review | Library/Homebrew/dev-cmd/audit.rb | @@ -121,7 +121,7 @@ def audit
# Run tap audits first
if args.tap
tap = Tap.fetch(args.tap)
- ta = TapAuditor.new(tap, options)
+ ta = TapAuditor.new(tap, strict: args.strict?)
ta.audit
if ta.problems.any?
@@ -1158,25 +1158,24 @@ def problem(text)
class TapAuditor
attr_reader :name, :path, :tap_audit_exceptions, :problems
- def initialize(tap, options = {})
+ def initialize(tap, strict:)
@name = tap.name
@path = tap.path
@tap_audit_exceptions = tap.audit_exceptions
- @strict = options[:strict]
+ @strict = strict
@problems = []
end
def audit
audit_json_files
audit_tap_audit_exceptions
- self
end
def audit_json_files
- Dir[@path/"**/*.json"].each do |file|
- JSON.parse Pathname.new(file).read
+ Pathname.glob(@path/"**/*.json").each do |file|
+ JSON.parse file.read
rescue JSON::ParserError
- problem "#{file.delete_prefix("#{@path}/")} contains invalid JSON"
+ problem "#{file.to_s.delete_prefix("#{@path}/")} contains invalid JSON"
end
end
@@ -1186,16 +1185,16 @@ def audit_tap_audit_exceptions
invalid_formulae = []
formula_names.each do |name|
- invalid_formulae.push name if Formulary.factory(name).tap != @name
+ invalid_formulae << name if Formula[name].tap != @name
rescue FormulaUnavailableError
- invalid_formulae.push name
+ invalid_formulae << name
end
next if invalid_formulae.empty?
problem <<~EOS
audit_exceptions/#{list_name}.json references
- formulae that were are found in the #{@name} tap.
+ formulae that are not found in the #{@name} tap.
Invalid formulae: #{invalid_formulae.join(", ")}
EOS
end | true |
Other | Homebrew | brew | 2a941ec6b17bcb0d9557cf3604d64a3954cc199e.json | audit, tap: incorporate suggestions from code review | Library/Homebrew/tap.rb | @@ -546,12 +546,12 @@ def tap_migrations
def audit_exceptions
@audit_exceptions = {}
- Dir[path/"audit_exceptions/*"].each do |exception_file|
- list_name = File.basename(exception_file).chomp(".json").to_sym
+ Pathname.glob(path/"audit_exceptions/*").each do |exception_file|
+ list_name = exception_file.basename.to_s.chomp(".json").to_sym
list_contents = begin
- JSON.parse Pathname.new(exception_file).read
+ JSON.parse exception_file.read
rescue JSON::ParserError
- nil
+ opoo "#{exception_file} contains invalid JSON"
end
next if list_contents.nil? | true |
Other | Homebrew | brew | 089810709cfaae625867f2ee3e9c61f6822e9a2c.json | audit: add tap_audit_exceptions attribute | Library/Homebrew/dev-cmd/audit.rb | @@ -1156,7 +1156,7 @@ def problem(text)
end
class TapAuditor
- attr_reader :name, :path, :problems
+ attr_reader :name, :path, :tap_audit_exceptions, :problems
def initialize(tap, options = {})
@name = tap.name | false |
Other | Homebrew | brew | 1b95059c2b1db0e45e9a10fb2040a90311bbdd3d.json | Restrict audit to homebrew/core
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/rubocops/lines.rb | @@ -668,6 +668,8 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
# This cop ensures that new formulae depending on Requirements are not introduced in homebrew/core.
class CoreRequirements < FormulaCop
def audit_formula(_node, _class_node, _parent_class_node, _body_node)
+ return if formula_tap != "homebrew-core"
+
if depends_on? :java
problem "Formulae in homebrew/core should depend on a versioned `openjdk` instead of :java"
end | false |
Other | Homebrew | brew | fe1c7c16b0d2df1a6e9e85dbb5f4bdec93971e84.json | audit: add tap audits for audit exceptions | Library/Homebrew/dev-cmd/audit.rb | @@ -118,6 +118,21 @@ def audit
options[:except_cops] = [:FormulaAuditStrict]
end
+ # Run tap audits first
+ if args.tap
+ tap = Tap.fetch(args.tap)
+ ta = TapAuditor.new(tap, options)
+ ta.audit
+
+ if ta.problems.any?
+ tap_problem_lines = format_problem_lines(ta.problems)
+ tap_problem_count = ta.problems.size
+
+ puts "#{tap.name}:", tap_problem_lines.map { |s| " #{s}" }
+ odie "#{tap_problem_count} #{"problem".pluralize(tap_problem_count)} in 1 tap detected"
+ end
+ end
+
# Check style in a single batch run up front for performance
style_offenses = Style.check_style_json(style_files, options) if style_files
# load licenses
@@ -1144,4 +1159,55 @@ def problem(text)
@problems << text
end
end
+
+ class TapAuditor
+ attr_reader :name, :path, :problems
+
+ def initialize(tap, options = {})
+ @name = tap.name
+ @path = tap.path
+ @tap_audit_exceptions = tap.audit_exceptions
+ @strict = options[:strict]
+ @problems = []
+ end
+
+ def audit
+ audit_json_files
+ audit_tap_audit_exceptions
+ self
+ end
+
+ def audit_json_files
+ Dir[@path/"**/*.json"].each do |file|
+ JSON.parse Pathname.new(file).read
+ rescue JSON::ParserError
+ problem "#{file.delete_prefix("#{@path}/")} contains invalid JSON"
+ end
+ end
+
+ def audit_tap_audit_exceptions
+ @tap_audit_exceptions.each do |list_name, formula_names|
+ formula_names = formula_names.keys if formula_names.is_a? Hash
+
+ invalid_formulae = []
+ formula_names.each do |name|
+ invalid_formulae.push name if Formulary.factory(name).tap != @name
+ rescue FormulaUnavailableError
+ invalid_formulae.push name
+ end
+
+ next if invalid_formulae.empty?
+
+ problem <<~EOS
+ audit_exceptions/#{list_name}.json references
+ formulae that were are found in the #{@name} tap.
+ Invalid formulae: #{invalid_formulae.join(", ")}
+ EOS
+ end
+ end
+
+ def problem(message, location: nil)
+ @problems << ({ message: message, location: location })
+ end
+ end
end | false |
Other | Homebrew | brew | e1f463ff26a13eda48f4fcbaf0049a593d2cb8f0.json | audit: use name `tap_audit_exceptions` | Library/Homebrew/dev-cmd/audit.rb | @@ -127,15 +127,15 @@ def audit
audit_formulae.sort.each do |f|
only = only_cops ? ["style"] : args.only
options = {
- new_formula: new_formula,
- strict: strict,
- online: online,
- git: git,
- only: only,
- except: args.except,
- spdx_license_data: spdx_license_data,
- spdx_exception_data: spdx_exception_data,
- audit_exceptions: f.tap.audit_exceptions,
+ new_formula: new_formula,
+ strict: strict,
+ online: online,
+ git: git,
+ only: only,
+ except: args.except,
+ spdx_license_data: spdx_license_data,
+ spdx_exception_data: spdx_exception_data,
+ tap_audit_exceptions: f.tap.audit_exceptions,
}
options[:style_offenses] = style_offenses.for_path(f.path) if style_offenses
options[:display_cop_names] = args.display_cop_names?
@@ -248,7 +248,7 @@ def initialize(formula, options = {})
@specs = %w[stable head].map { |s| formula.send(s) }.compact
@spdx_license_data = options[:spdx_license_data]
@spdx_exception_data = options[:spdx_exception_data]
- @audit_exceptions = options[:audit_exceptions]
+ @tap_audit_exceptions = options[:tap_audit_exceptions]
end
def audit_style
@@ -816,7 +816,7 @@ def audit_specs
stable_url_minor_version = stable_url_version.minor.to_i
formula_suffix = stable.version.patch.to_i
- throttled_rate = audit_exception_list("THROTTLED_FORMULAE")[formula.name]
+ throttled_rate = tap_audit_exception_list(:throttled_formulae)[formula.name]
if throttled_rate && formula_suffix.modulo(throttled_rate).nonzero?
problem "should only be updated every #{throttled_rate} releases on multiples of #{throttled_rate}"
end
@@ -1025,9 +1025,9 @@ def head_only?(formula)
formula.head && formula.stable.nil?
end
- def audit_exception_list(list)
- if @audit_exceptions.key? list
- @audit_exceptions[list]
+ def tap_audit_exception_list(list)
+ if @tap_audit_exceptions.key? list
+ @tap_audit_exceptions[list]
else
{}
end | false |
Other | Homebrew | brew | 10ae9bcde728148ffed445f976cb06d3cf08e65d.json | modify autoremove to use uninstall | Library/Homebrew/cmd/autoremove.rb | @@ -2,8 +2,11 @@
require "formula"
require "cli/parser"
+require "uninstall"
module Homebrew
+ extend Uninstall
+
module_function
def autoremove_args
@@ -19,17 +22,13 @@ def autoremove_args
end
end
- def get_removable_formulae(installed_formulae)
- removable_formulae = []
-
- installed_formulae.each do |formula|
- # Reject formulae installed on request.
- next if Tab.for_keg(formula.any_installed_keg).installed_on_request
- # Reject formulae which are needed at runtime by other formulae.
- next if installed_formulae.flat_map(&:runtime_formula_dependencies).include?(formula)
+ def get_removable_formulae(formulae)
+ removable_formulae = Formula.installed_non_deps(formulae).reject {
+ |f| Tab.for_keg(f.any_installed_keg).installed_on_request
+ }
- removable_formulae << installed_formulae.delete(formula)
- removable_formulae += get_removable_formulae(installed_formulae)
+ if removable_formulae.any?
+ removable_formulae += get_removable_formulae(formulae - removable_formulae)
end
removable_formulae
@@ -38,17 +37,18 @@ def get_removable_formulae(installed_formulae)
def autoremove
args = autoremove_args.parse
- removable_formulae = get_removable_formulae(Formula.installed.sort)
+ removable_formulae = get_removable_formulae(Formula.installed)
return if removable_formulae.blank?
- formulae_names = removable_formulae.map(&:full_name)
+ formulae_names = removable_formulae.map(&:full_name).sort
oh1 "Formulae that could be removed"
puts formulae_names
-
+
return if args.dry_run?
- system HOMEBREW_BREW_FILE, "rm", *formulae_names
+ kegs_by_rack = removable_formulae.map(&:any_installed_keg).group_by(&:rack)
+ uninstall_kegs(kegs_by_rack)
end
end | false |
Other | Homebrew | brew | 0fa417706a2143dbec1e6fd2f29f3e3e32663252.json | cmd: add autoremove command | Library/Homebrew/cmd/autoremove.rb | @@ -0,0 +1,54 @@
+# frozen_string_literal: true
+
+require "formula"
+require "cli/parser"
+
+module Homebrew
+ module_function
+
+ def autoremove_args
+ Homebrew::CLI::Parser.new do
+ usage_banner <<~EOS
+ `autoremove` [<options>]
+
+ Remove packages that weren't installed on request and are no longer needed.
+ EOS
+ switch "-n", "--dry-run",
+ description: "Just print what would be removed."
+ named 0
+ end
+ end
+
+ def get_removable_formulae(installed_formulae)
+ removable_formulae = []
+
+ installed_formulae.each do |formula|
+ # Reject formulae installed on request.
+ next if Tab.for_keg(formula.any_installed_keg).installed_on_request
+ # Reject formulae which are needed at runtime by other formulae.
+ next if installed_formulae.flat_map(&:runtime_formula_dependencies).include?(formula)
+
+ removable_formulae << installed_formulae.delete(formula)
+ removable_formulae += get_removable_formulae(installed_formulae)
+ end
+
+ removable_formulae
+ end
+
+ def autoremove
+ args = autoremove_args.parse
+
+ removable_formulae = get_removable_formulae(Formula.installed.sort)
+
+ return if removable_formulae.blank?
+
+ formulae_names = removable_formulae.map(&:full_name)
+
+ oh1 "Formulae that could be removed"
+ puts formulae_names
+
+ return if args.dry_run?
+
+ system HOMEBREW_BREW_FILE, "rm", *formulae_names
+ end
+end | true |
Other | Homebrew | brew | 0fa417706a2143dbec1e6fd2f29f3e3e32663252.json | cmd: add autoremove command | Library/Homebrew/test/.rubocop_todo.yml | @@ -33,6 +33,7 @@ RSpec/MultipleDescribes:
- 'cmd/--repository_spec.rb'
- 'cmd/--version_spec.rb'
- 'cmd/analytics_spec.rb'
+ - 'cmd/autoremove_spec.rb'
- 'cmd/cleanup_spec.rb'
- 'cmd/commands_spec.rb'
- 'cmd/config_spec.rb' | true |
Other | Homebrew | brew | 0fa417706a2143dbec1e6fd2f29f3e3e32663252.json | cmd: add autoremove command | Library/Homebrew/test/cmd/autoremove_spec.rb | @@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+require "cmd/shared_examples/args_parse"
+
+describe "Homebrew.autoremove_args" do
+ it_behaves_like "parseable arguments"
+end | true |
Other | Homebrew | brew | 0fa417706a2143dbec1e6fd2f29f3e3e32663252.json | cmd: add autoremove command | completions/internal_commands_list.txt | @@ -12,6 +12,7 @@
abv
analytics
audit
+autoremove
bottle
bump
bump-cask-pr | true |
Other | Homebrew | brew | 0fa417706a2143dbec1e6fd2f29f3e3e32663252.json | cmd: add autoremove command | docs/Manpage.md | @@ -56,6 +56,13 @@ Turn Homebrew's analytics on or off respectively.
`brew analytics regenerate-uuid`:
Regenerate the UUID used for Homebrew's analytics.
+### `autoremove` [*`options`*]
+
+Remove packages that weren't installed on request and are no longer needed.
+
+* `-n`, `--dry-run`:
+ Just print what would be removed.
+
### `cask` *`command`* [*`options`*] [*`cask`*]
Homebrew Cask provides a friendly CLI workflow for the administration of macOS applications distributed as binaries. | true |
Other | Homebrew | brew | 0fa417706a2143dbec1e6fd2f29f3e3e32663252.json | cmd: add autoremove command | manpages/brew.1 | @@ -53,6 +53,13 @@ Control Homebrew\'s anonymous aggregate user behaviour analytics\. Read more at
\fBbrew analytics regenerate\-uuid\fR
Regenerate the UUID used for Homebrew\'s analytics\.
.
+.SS "\fBautoremove\fR [\fIoptions\fR]"
+Remove packages that weren\'t installed on request and are no longer needed\.
+.
+.TP
+\fB\-n\fR, \fB\-\-dry\-run\fR
+Just print what would be removed\.
+.
.SS "\fBcask\fR \fIcommand\fR [\fIoptions\fR] [\fIcask\fR]"
Homebrew Cask provides a friendly CLI workflow for the administration of macOS applications distributed as binaries\.
. | true |
Other | Homebrew | brew | 4127a7b62422ed0b9c38dbe022ee958640b7c614.json | move some uninstall tests to new file | Library/Homebrew/test/cmd/uninstall_spec.rb | @@ -19,61 +19,3 @@
.and be_a_success
end
end
-
-describe Homebrew do
- let(:dependency) { formula("dependency") { url "f-1" } }
- let(:dependent) do
- formula("dependent") do
- url "f-1"
- depends_on "dependency"
- end
- end
-
- let(:kegs_by_rack) { { dependency.rack => [Keg.new(dependency.latest_installed_prefix)] } }
-
- before do
- [dependency, dependent].each do |f|
- f.latest_installed_prefix.mkpath
- Keg.new(f.latest_installed_prefix).optlink
- end
-
- tab = Tab.empty
- tab.homebrew_version = "1.1.6"
- tab.tabfile = dependent.latest_installed_prefix/Tab::FILENAME
- tab.runtime_dependencies = [
- { "full_name" => "dependency", "version" => "1" },
- ]
- tab.write
-
- stub_formula_loader dependency
- stub_formula_loader dependent
- end
-
- describe "::handle_unsatisfied_dependents" do
- specify "when developer" do
- ENV["HOMEBREW_DEVELOPER"] = "1"
-
- expect {
- described_class.handle_unsatisfied_dependents(kegs_by_rack)
- }.to output(/Warning/).to_stderr
-
- expect(described_class).not_to have_failed
- end
-
- specify "when not developer" do
- expect {
- described_class.handle_unsatisfied_dependents(kegs_by_rack)
- }.to output(/Error/).to_stderr
-
- expect(described_class).to have_failed
- end
-
- specify "when not developer and `ignore_dependencies` is true" do
- expect {
- described_class.handle_unsatisfied_dependents(kegs_by_rack, ignore_dependencies: true)
- }.not_to output.to_stderr
-
- expect(described_class).not_to have_failed
- end
- end
-end | true |
Other | Homebrew | brew | 4127a7b62422ed0b9c38dbe022ee958640b7c614.json | move some uninstall tests to new file | Library/Homebrew/test/uninstall_spec.rb | @@ -0,0 +1,62 @@
+# typed: false
+# frozen_string_literal: true
+
+require "uninstall"
+
+describe Homebrew::Uninstall do
+ let(:dependency) { formula("dependency") { url "f-1" } }
+ let(:dependent) do
+ formula("dependent") do
+ url "f-1"
+ depends_on "dependency"
+ end
+ end
+
+ let(:kegs_by_rack) { { dependency.rack => [Keg.new(dependency.latest_installed_prefix)] } }
+
+ before do
+ [dependency, dependent].each do |f|
+ f.latest_installed_prefix.mkpath
+ Keg.new(f.latest_installed_prefix).optlink
+ end
+
+ tab = Tab.empty
+ tab.homebrew_version = "1.1.6"
+ tab.tabfile = dependent.latest_installed_prefix/Tab::FILENAME
+ tab.runtime_dependencies = [
+ { "full_name" => "dependency", "version" => "1" },
+ ]
+ tab.write
+
+ stub_formula_loader dependency
+ stub_formula_loader dependent
+ end
+
+ describe "::handle_unsatisfied_dependents" do
+ specify "when developer" do
+ ENV["HOMEBREW_DEVELOPER"] = "1"
+
+ expect {
+ described_class.handle_unsatisfied_dependents(kegs_by_rack)
+ }.to output(/Warning/).to_stderr
+
+ expect(Homebrew).not_to have_failed
+ end
+
+ specify "when not developer" do
+ expect {
+ described_class.handle_unsatisfied_dependents(kegs_by_rack)
+ }.to output(/Error/).to_stderr
+
+ expect(Homebrew).to have_failed
+ end
+
+ specify "when not developer and `ignore_dependencies` is true" do
+ expect {
+ described_class.handle_unsatisfied_dependents(kegs_by_rack, ignore_dependencies: true)
+ }.not_to output.to_stderr
+
+ expect(Homebrew).not_to have_failed
+ end
+ end
+end | true |
Other | Homebrew | brew | 30a35614484f422c78a6328bcae2504b8ec35fb2.json | move uninstall logic to new file | Library/Homebrew/cmd/uninstall.rb | @@ -8,8 +8,11 @@
require "cli/parser"
require "cask/cmd"
require "cask/cask_loader"
+require "uninstall"
module Homebrew
+ extend Uninstall
+
module_function
def uninstall_args
@@ -54,76 +57,10 @@ def uninstall
kegs_by_rack = all_kegs.group_by(&:rack)
end
- handle_unsatisfied_dependents(kegs_by_rack,
- ignore_dependencies: args.ignore_dependencies?,
- named_args: args.named)
- return if Homebrew.failed?
-
- kegs_by_rack.each do |rack, kegs|
- if args.force?
- name = rack.basename
-
- if rack.directory?
- puts "Uninstalling #{name}... (#{rack.abv})"
- kegs.each do |keg|
- keg.unlink
- keg.uninstall
- end
- end
-
- rm_pin rack
- else
- kegs.each do |keg|
- begin
- f = Formulary.from_rack(rack)
- if f.pinned?
- onoe "#{f.full_name} is pinned. You must unpin it to uninstall."
- next
- end
- rescue
- nil
- end
-
- keg.lock do
- puts "Uninstalling #{keg}... (#{keg.abv})"
- keg.unlink
- keg.uninstall
- rack = keg.rack
- rm_pin rack
-
- if rack.directory?
- versions = rack.subdirs.map(&:basename)
- puts "#{keg.name} #{versions.to_sentence} #{"is".pluralize(versions.count)} still installed."
- puts "Run `brew uninstall --force #{keg.name}` to remove all versions."
- end
-
- next unless f
-
- paths = f.pkgetc.find.map(&:to_s) if f.pkgetc.exist?
- if paths.present?
- puts
- opoo <<~EOS
- The following #{f.name} configuration files have not been removed!
- If desired, remove them manually with `rm -rf`:
- #{paths.sort.uniq.join("\n ")}
- EOS
- end
-
- unversioned_name = f.name.gsub(/@.+$/, "")
- maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*")
- maybe_paths -= paths if paths.present?
- if maybe_paths.present?
- puts
- opoo <<~EOS
- The following may be #{f.name} configuration files and have not been removed!
- If desired, remove them manually with `rm -rf`:
- #{maybe_paths.sort.uniq.join("\n ")}
- EOS
- end
- end
- end
- end
- end
+ uninstall_kegs(kegs_by_rack,
+ force: args.force?,
+ ignore_dependencies: args.ignore_dependencies?,
+ named_args: args.named)
return if casks.blank?
@@ -144,74 +81,4 @@ def uninstall
end
end
end
-
- def handle_unsatisfied_dependents(kegs_by_rack, ignore_dependencies: false, named_args: [])
- return if ignore_dependencies
-
- all_kegs = kegs_by_rack.values.flatten(1)
- check_for_dependents(all_kegs, named_args: named_args)
- rescue MethodDeprecatedError
- # Silently ignore deprecations when uninstalling.
- nil
- end
-
- def check_for_dependents(kegs, named_args: [])
- return false unless result = Keg.find_some_installed_dependents(kegs)
-
- if Homebrew::EnvConfig.developer?
- DeveloperDependentsMessage.new(*result, named_args: named_args).output
- else
- NondeveloperDependentsMessage.new(*result, named_args: named_args).output
- end
-
- true
- end
-
- class DependentsMessage
- attr_reader :reqs, :deps, :named_args
-
- def initialize(requireds, dependents, named_args: [])
- @reqs = requireds
- @deps = dependents
- @named_args = named_args
- end
-
- protected
-
- def sample_command
- "brew uninstall --ignore-dependencies #{named_args.join(" ")}"
- end
-
- def are_required_by_deps
- "#{"is".pluralize(reqs.count)} required by #{deps.to_sentence}, " \
- "which #{"is".pluralize(deps.count)} currently installed"
- end
- end
-
- class DeveloperDependentsMessage < DependentsMessage
- def output
- opoo <<~EOS
- #{reqs.to_sentence} #{are_required_by_deps}.
- You can silence this warning with:
- #{sample_command}
- EOS
- end
- end
-
- class NondeveloperDependentsMessage < DependentsMessage
- def output
- ofail <<~EOS
- Refusing to uninstall #{reqs.to_sentence}
- because #{"it".pluralize(reqs.count)} #{are_required_by_deps}.
- You can override this and force removal with:
- #{sample_command}
- EOS
- end
- end
-
- def rm_pin(rack)
- Formulary.from_rack(rack).unpin
- rescue
- nil
- end
end | true |
Other | Homebrew | brew | 30a35614484f422c78a6328bcae2504b8ec35fb2.json | move uninstall logic to new file | Library/Homebrew/uninstall.rb | @@ -0,0 +1,215 @@
+# typed: true
+# frozen_string_literal: true
+
+require "keg"
+require "formula"
+
+module Homebrew
+ # Helper module for uninstalling kegs.
+ #
+ # @api private
+ module Uninstall
+ module_function
+
+ def uninstall_kegs(kegs_by_rack, force: false, ignore_dependencies: false, named_args: [])
+ handle_unsatisfied_dependents(kegs_by_rack,
+ ignore_dependencies: ignore_dependencies,
+ named_args: named_args)
+ return if Homebrew.failed?
+
+ kegs_by_rack.each do |rack, kegs|
+ if force
+ name = rack.basename
+
+ if rack.directory?
+ puts "Uninstalling #{name}... (#{rack.abv})"
+ kegs.each do |keg|
+ keg.unlink
+ keg.uninstall
+ end
+ end
+
+ rm_pin rack
+ else
+ kegs.each do |keg|
+ begin
+ f = Formulary.from_rack(rack)
+ if f.pinned?
+ onoe "#{f.full_name} is pinned. You must unpin it to uninstall."
+ next
+ end
+ rescue
+ nil
+ end
+
+ keg.lock do
+ puts "Uninstalling #{keg}... (#{keg.abv})"
+ keg.unlink
+ keg.uninstall
+ rack = keg.rack
+ rm_pin rack
+
+ if rack.directory?
+ versions = rack.subdirs.map(&:basename)
+ puts "#{keg.name} #{versions.to_sentence} #{"is".pluralize(versions.count)} still installed."
+ puts "Run `brew uninstall --force #{keg.name}` to remove all versions."
+ end
+
+ next unless f
+
+ paths = f.pkgetc.find.map(&:to_s) if f.pkgetc.exist?
+ if paths.present?
+ puts
+ opoo <<~EOS
+ The following #{f.name} configuration files have not been removed!
+ If desired, remove them manually with `rm -rf`:
+ #{paths.sort.uniq.join("\n ")}
+ EOS
+ end
+
+ unversioned_name = f.name.gsub(/@.+$/, "")
+ maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*")
+ maybe_paths -= paths if paths.present?
+ if maybe_paths.present?
+ puts
+ opoo <<~EOS
+ The following may be #{f.name} configuration files and have not been removed!
+ If desired, remove them manually with `rm -rf`:
+ #{maybe_paths.sort.uniq.join("\n ")}
+ EOS
+ end
+ end
+ end
+ end
+ end
+ end
+
+ def handle_unsatisfied_dependents(kegs_by_rack, ignore_dependencies: false, named_args: [])
+ return if ignore_dependencies
+
+ all_kegs = kegs_by_rack.values.flatten(1)
+ check_for_dependents(all_kegs, named_args: named_args)
+ rescue MethodDeprecatedError
+ # Silently ignore deprecations when uninstalling.
+ nil
+ end
+
+ def check_for_dependents(kegs, named_args: [])
+ return false unless result = Keg.find_some_installed_dependents(kegs)
+
+ if Homebrew::EnvConfig.developer?
+ DeveloperDependentsMessage.new(*result, named_args: named_args).output
+ else
+ NondeveloperDependentsMessage.new(*result, named_args: named_args).output
+ end
+
+ true
+ end
+
+ class DependentsMessage
+ attr_reader :reqs, :deps, :named_args
+
+ def initialize(requireds, dependents, named_args: [])
+ @reqs = requireds
+ @deps = dependents
+ @named_args = named_args
+ end
+
+ protected
+
+ def sample_command
+ "brew uninstall --ignore-dependencies #{named_args.join(" ")}"
+ end
+
+ def are_required_by_deps
+ "#{"is".pluralize(reqs.count)} required by #{deps.to_sentence}, " \
+ "which #{"is".pluralize(deps.count)} currently installed"
+ end
+ end
+
+ class DeveloperDependentsMessage < DependentsMessage
+ def output
+ opoo <<~EOS
+ #{reqs.to_sentence} #{are_required_by_deps}.
+ You can silence this warning with:
+ #{sample_command}
+ EOS
+ end
+ end
+
+ class NondeveloperDependentsMessage < DependentsMessage
+ def output
+ ofail <<~EOS
+ Refusing to uninstall #{reqs.to_sentence}
+ because #{"it".pluralize(reqs.count)} #{are_required_by_deps}.
+ You can override this and force removal with:
+ #{sample_command}
+ EOS
+ end
+ end
+
+ def rm_pin(rack)
+ Formulary.from_rack(rack).unpin
+ rescue
+ nil
+ end
+
+ # def perform_preinstall_checks(all_fatal: false, cc: nil)
+ # check_cpu
+ # attempt_directory_creation
+ # check_cc_argv(cc)
+ # Diagnostic.checks(:supported_configuration_checks, fatal: all_fatal)
+ # Diagnostic.checks(:fatal_preinstall_checks)
+ # end
+ # alias generic_perform_preinstall_checks perform_preinstall_checks
+ # module_function :generic_perform_preinstall_checks
+
+ # def perform_build_from_source_checks(all_fatal: false)
+ # Diagnostic.checks(:fatal_build_from_source_checks)
+ # Diagnostic.checks(:build_from_source_checks, fatal: all_fatal)
+ # end
+
+ # def check_cpu
+ # return if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
+
+ # message = "Sorry, Homebrew does not support your computer's CPU architecture!"
+ # if Hardware::CPU.arm?
+ # opoo message
+ # return
+ # elsif Hardware::CPU.ppc?
+ # message += <<~EOS
+ # For PowerPC Mac (PPC32/PPC64BE) support, see:
+ # #{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
+ # EOS
+ # end
+ # abort message
+ # end
+ # private_class_method :check_cpu
+
+ # def attempt_directory_creation
+ # Keg::MUST_EXIST_DIRECTORIES.each do |dir|
+ # FileUtils.mkdir_p(dir) unless dir.exist?
+
+ # # Create these files to ensure that these directories aren't removed
+ # # by the Catalina installer.
+ # # (https://github.com/Homebrew/brew/issues/6263)
+ # keep_file = dir/".keepme"
+ # FileUtils.touch(keep_file) unless keep_file.exist?
+ # rescue
+ # nil
+ # end
+ # end
+ # private_class_method :attempt_directory_creation
+
+ # def check_cc_argv(cc)
+ # return unless cc
+
+ # @checks ||= Diagnostic::Checks.new
+ # opoo <<~EOS
+ # You passed `--cc=#{cc}`.
+ # #{@checks.please_create_pull_requests}
+ # EOS
+ # end
+ # private_class_method :check_cc_argv
+ end
+end | true |
Other | Homebrew | brew | f95e1729a2d95d8dc80dadc8c05851d534a72f74.json | move logic from leaves to formula | Library/Homebrew/cmd/leaves.rb | @@ -2,7 +2,6 @@
# frozen_string_literal: true
require "formula"
-require "tab"
require "cli/parser"
module Homebrew
@@ -23,9 +22,7 @@ def leaves_args
def leaves
leaves_args.parse
- installed = Formula.installed.sort
- deps_of_installed = installed.flat_map(&:runtime_formula_dependencies)
- leaves = installed.map(&:full_name) - deps_of_installed.map(&:full_name)
+ leaves = Formula.installed_non_deps.map(&:full_name).sort
leaves.each(&method(:puts))
end
end | true |
Other | Homebrew | brew | f95e1729a2d95d8dc80dadc8c05851d534a72f74.json | move logic from leaves to formula | Library/Homebrew/formula.rb | @@ -1515,6 +1515,18 @@ def self.installed
end.uniq(&:name)
end
+ # An array of installed {Formula} that are dependencies of other installed {Formula}
+ # @private
+ def self.installed_deps(formulae=installed)
+ formulae.flat_map(&:runtime_formula_dependencies).uniq(&:name)
+ end
+
+ # An array of all installed {Formula} that are not dependencies of other installed {Formula}
+ # @private
+ def self.installed_non_deps(formulae=installed)
+ formulae - installed_deps(formulae)
+ end
+
def self.installed_with_alias_path(alias_path)
return [] if alias_path.nil?
| true |
Other | Homebrew | brew | f95e1729a2d95d8dc80dadc8c05851d534a72f74.json | move logic from leaves to formula | Library/Homebrew/test/cmd/leaves_spec.rb | @@ -8,14 +8,42 @@
end
describe "brew leaves", :integration_test do
- it "prints all Formulae that are not dependencies of other Formulae" do
- setup_test_formula "foo"
- setup_test_formula "bar"
- (HOMEBREW_CELLAR/"foo/0.1/somedir").mkpath
+ context "when there are no installed Formulae" do
+ it "prints nothing" do
+ setup_test_formula "foo"
+ setup_test_formula "bar"
+
+ expect { brew "leaves" }
+ .to not_to_output.to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
+
+ context "when there are only installed Formulae without dependencies" do
+ it "prints all installed Formulae" do
+ setup_test_formula "foo"
+ setup_test_formula "bar"
+ (HOMEBREW_CELLAR/"foo/0.1/somedir").mkpath
+
+ expect { brew "leaves" }
+ .to output("foo\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
+ end
- expect { brew "leaves" }
- .to output("foo\n").to_stdout
- .and not_to_output.to_stderr
- .and be_a_success
+ context "when there are installed Formulae" do
+ it "prints all installed Formulae that are not dependencies of another installed Formula" do
+ setup_test_formula "foo"
+ setup_test_formula "bar"
+ (HOMEBREW_CELLAR/"foo/0.1/somedir").mkpath
+ (HOMEBREW_CELLAR/"bar/0.1/somedir").mkpath
+
+ expect { brew "leaves" }
+ .to output("bar\n").to_stdout
+ .and not_to_output.to_stderr
+ .and be_a_success
+ end
end
end | true |
Other | Homebrew | brew | f95e1729a2d95d8dc80dadc8c05851d534a72f74.json | move logic from leaves to formula | Library/Homebrew/test/formula_spec.rb | @@ -440,6 +440,80 @@
end
end
+ describe "::installed_deps" do
+ let(:formula_is_dep) do
+ formula "foo" do
+ url "foo-1.1"
+ end
+ end
+
+ let(:formula_with_deps) do
+ formula "bar" do
+ url "bar-1.0"
+ end
+ end
+
+ let(:formulae) do
+ [
+ formula_with_deps,
+ formula_is_dep
+ ]
+ end
+
+ before do
+ allow(formula_with_deps).to receive(:runtime_formula_dependencies).and_return([ formula_is_dep ])
+ end
+
+ specify "without formulae parameter" do
+ allow(described_class).to receive(:installed).and_return(formulae)
+
+ expect(described_class.installed_deps)
+ .to eq([formula_is_dep])
+ end
+
+ specify "with formulae parameter" do
+ expect(described_class.installed_deps(formulae))
+ .to eq([formula_is_dep])
+ end
+ end
+
+ describe "::installed_non_deps" do
+ let(:formula_is_dep) do
+ formula "foo" do
+ url "foo-1.1"
+ end
+ end
+
+ let(:formula_with_deps) do
+ formula "bar" do
+ url "bar-1.0"
+ end
+ end
+
+ let(:formulae) do
+ [
+ formula_with_deps,
+ formula_is_dep
+ ]
+ end
+
+ before do
+ allow(formula_with_deps).to receive(:runtime_formula_dependencies).and_return([ formula_is_dep ])
+ end
+
+ specify "without formulae parameter" do
+ allow(described_class).to receive(:installed).and_return(formulae)
+
+ expect(described_class.installed_non_deps)
+ .to eq([formula_with_deps])
+ end
+
+ specify "with formulae parameter" do
+ expect(described_class.installed_non_deps(formulae))
+ .to eq([formula_with_deps])
+ end
+ end
+
describe "::installed_with_alias_path" do
specify "with alias path with nil" do
expect(described_class.installed_with_alias_path(nil)).to be_empty | true |
Other | Homebrew | brew | 7e2b228460e87ad247b73859da2576d5f782315c.json | diagnostic: improve deleted message.
Raised in #9036. | Library/Homebrew/diagnostic.rb | @@ -851,7 +851,8 @@ def check_deleted_formula
return if deleted_formulae.blank?
<<~EOS
- Some installed formulae were deleted!
+ Some installed kegs have no formulae!
+ This means they were either deleted or installed with `brew diy`.
You should find replacements for the following formulae:
#{deleted_formulae.join("\n ")}
EOS | false |
Other | Homebrew | brew | 1f971ba2a0575523300df2f4e63c03769ed3ad2a.json | link: link kegs without formulae.
Needed for `brew diy`.
Fixes #9036 | Library/Homebrew/cmd/link.rb | @@ -67,10 +67,15 @@ def link
next
end
- formula = keg.to_formula
+ formula = begin
+ keg.to_formula
+ rescue FormulaUnavailableError
+ # Not all kegs may belong to formulae e.g. with `brew diy`
+ nil
+ end
if keg_only
- if Homebrew.default_prefix? && formula.keg_only_reason.by_macos?
+ if Homebrew.default_prefix? && formula.present? && formula.keg_only_reason.by_macos?
caveats = Caveats.new(formula)
opoo <<~EOS
Refusing to link macOS provided/shadowed software: #{keg.name}
@@ -79,14 +84,14 @@ def link
next
end
- if !formula.keg_only_reason.versioned_formula? && !args.force?
+ if !args.force? && (formula.blank? || !formula.keg_only_reason.versioned_formula?)
opoo "#{keg.name} is keg-only and must be linked with --force"
puts_keg_only_path_message(keg)
next
end
end
- Unlink.unlink_versioned_formulae(formula, verbose: args.verbose?)
+ Unlink.unlink_versioned_formulae(formula, verbose: args.verbose?) if formula
keg.lock do
print "Linking #{keg}... " | false |
Other | Homebrew | brew | 8b85ef2e8851b32eaac3f3094c7a6044eceb20e3.json | formula: add on_linux and on_macos blocks
for install and others | Library/Homebrew/extend/os/linux/formula.rb | @@ -2,6 +2,14 @@
# frozen_string_literal: true
class Formula
+ undef on_linux
+
+ def on_linux(&_block)
+ raise "No block content defined for on_linux block" unless block_given?
+
+ yield
+ end
+
undef shared_library
def shared_library(name, version = nil)
@@ -12,6 +20,8 @@ class << self
undef on_linux
def on_linux(&_block)
+ raise "No block content defined for on_linux block" unless block_given?
+
yield
end
| true |
Other | Homebrew | brew | 8b85ef2e8851b32eaac3f3094c7a6044eceb20e3.json | formula: add on_linux and on_macos blocks
for install and others | Library/Homebrew/extend/os/mac/formula.rb | @@ -2,10 +2,20 @@
# frozen_string_literal: true
class Formula
+ undef on_macos
+
+ def on_macos(&_block)
+ raise "No block content defined for on_macos block" unless block_given?
+
+ yield
+ end
+
class << self
undef on_macos
def on_macos(&_block)
+ raise "No block content defined for on_macos block" unless block_given?
+
yield
end
end | true |
Other | Homebrew | brew | 8b85ef2e8851b32eaac3f3094c7a6044eceb20e3.json | formula: add on_linux and on_macos blocks
for install and others | Library/Homebrew/formula.rb | @@ -1366,6 +1366,22 @@ def inspect
"#<Formula #{name} (#{active_spec_sym}) #{path}>"
end
+ # Block only executed on macOS. No-op on Linux.
+ # <pre>on_macos do
+ # Do something mac specific
+ # end</pre>
+ def on_macos(&_block)
+ raise "No block content defined for on_macos block" unless block_given?
+ end
+
+ # Block only executed on Linux. No-op on macOS.
+ # <pre>on_linux do
+ # Do something linux specific
+ # end</pre>
+ def on_linux(&_block)
+ raise "No block content defined for on_linux block" unless block_given?
+ end
+
# Standard parameters for cargo builds.
def std_cargo_args
["--locked", "--root", prefix, "--path", "."]
@@ -2512,13 +2528,17 @@ def uses_from_macos(dep, bounds = {})
# <pre>on_macos do
# depends_on "mac_only_dep"
# end</pre>
- def on_macos(&_block); end
+ def on_macos(&_block)
+ raise "No block content defined for on_macos block" unless block_given?
+ end
# Block only executed on Linux. No-op on macOS.
# <pre>on_linux do
# depends_on "linux_only_dep"
# end</pre>
- def on_linux(&_block); end
+ def on_linux(&_block)
+ raise "No block content defined for on_linux block" unless block_given?
+ end
# @!attribute [w] option
# Options can be used as arguments to `brew install`. | true |
Other | Homebrew | brew | 8b85ef2e8851b32eaac3f3094c7a6044eceb20e3.json | formula: add on_linux and on_macos blocks
for install and others | Library/Homebrew/test/formula_spec.rb | @@ -1363,4 +1363,50 @@ def setup_tab_for_prefix(prefix, options = {})
expect(f.any_installed_version).to eq(PkgVersion.parse("1.0_1"))
end
end
+
+ describe "#on_macos", :needs_macos do
+ let(:f) do
+ Class.new(Testball) do
+ @test = 0
+ attr_reader :test
+
+ def install
+ on_macos do
+ @test = 1
+ end
+ on_linux do
+ @test = 2
+ end
+ end
+ end.new
+ end
+
+ it "only calls code within on_macos" do
+ f.brew { f.install }
+ expect(f.test).to eq(1)
+ end
+ end
+
+ describe "#on_linux", :needs_linux do
+ let(:f) do
+ Class.new(Testball) do
+ @test = 0
+ attr_reader :test
+
+ def install
+ on_macos do
+ @test = 1
+ end
+ on_linux do
+ @test = 2
+ end
+ end
+ end.new
+ end
+
+ it "only calls code within on_linux" do
+ f.brew { f.install }
+ expect(f.test).to eq(2)
+ end
+ end
end | true |
Other | Homebrew | brew | 5adb76a5babdccd2c4edfb8752ac979ed14716ca.json | list: fix flag handling.
Fix `-1` and other flags so they're handled correctly with casks. Use
the "right" exceptions for declaring invalid combinations and change
their parent class so that `--help` is printed nicely too.
Fixes #9033 | Library/Homebrew/cli/parser.rb | @@ -506,7 +506,7 @@ def formulae(argv)
end
end
- class OptionConstraintError < RuntimeError
+ class OptionConstraintError < UsageError
def initialize(arg1, arg2, missing: false)
message = if !missing
"`#{arg1}` and `#{arg2}` should be passed together."
@@ -517,15 +517,15 @@ def initialize(arg1, arg2, missing: false)
end
end
- class OptionConflictError < RuntimeError
+ class OptionConflictError < UsageError
def initialize(args)
args_list = args.map(&Formatter.public_method(:option))
.join(" and ")
super "Options #{args_list} are mutually exclusive."
end
end
- class InvalidConstraintError < RuntimeError
+ class InvalidConstraintError < UsageError
def initialize(arg1, arg2)
super "`#{arg1}` and `#{arg2}` cannot be mutually exclusive and mutually dependent simultaneously."
end | true |
Other | Homebrew | brew | 5adb76a5babdccd2c4edfb8752ac979ed14716ca.json | list: fix flag handling.
Fix `-1` and other flags so they're handled correctly with casks. Use
the "right" exceptions for declaring invalid combinations and change
their parent class so that `--help` is printed nicely too.
Fixes #9033 | Library/Homebrew/cmd/list.rb | @@ -18,38 +18,51 @@ def list_args
If <formula> is provided, summarise the paths within its current keg.
EOS
+ switch "--formula", "--formulae",
+ description: "List only formulae. `This is the default action on non TTY.`"
+ switch "--cask", "--casks",
+ description: "List only casks, or <cask> if provided."
+ switch "--unbrewed",
+ description: "List files in Homebrew's prefix not installed by Homebrew."
switch "--full-name",
+ depends_on: "--formula",
description: "Print formulae with fully-qualified names. If `--full-name` is not "\
"passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) "\
"which produces the actual output."
- switch "--unbrewed",
- description: "List files in Homebrew's prefix not installed by Homebrew."
switch "--versions",
+ depends_on: "--formula",
description: "Show the version number for installed formulae, or only the specified "\
"formulae if <formula> are provided."
switch "--multiple",
depends_on: "--versions",
description: "Only show formulae with multiple versions installed."
switch "--pinned",
+ depends_on: "--formula",
description: "Show the versions of pinned formulae, or only the specified (pinned) "\
"formulae if <formula> are provided. See also `pin`, `unpin`."
- switch "--formula", "--formulae",
- description: "List only formulae. `This is the default action on non TTY.`"
- switch "--cask", "--casks",
- description: "List only casks, or <cask> if provided."
# passed through to ls
switch "-1",
description: "Force output to be one entry per line. " \
"This is the default when output is not to a terminal."
switch "-l",
- description: "List in long format. If the output is to a terminal, "\
+ depends_on: "--formula",
+ description: "List formulae in long format. If the output is to a terminal, "\
"a total sum for all the file sizes is printed before the long listing."
switch "-r",
- description: "Reverse the order of the sort to list the oldest entries first."
+ depends_on: "--formula",
+ description: "Reverse the order of the formulae sort to list the oldest entries first."
switch "-t",
- description: "Sort by time modified, listing most recently modified first."
+ depends_on: "--formula",
+ description: "Sort formulae by time modified, listing most recently modified first."
+
+ ["-1", "-l", "-r", "-t"].each do |flag|
+ conflicts "--full-name", flag
+ conflicts "--unbrewed", flag
+ conflicts "--pinned", flag
+ conflicts "--versions", flag
+ end
- ["--formula", "--unbrewed", "--multiple", "--pinned", "-l", "-r", "-t"].each do |flag|
+ ["--unbrewed", "--formula", "-l", "-r", "-t"].each do |flag|
conflicts "--cask", flag
end
end
@@ -104,6 +117,7 @@ def list
UNBREWED_EXCLUDE_FILES = %w[.DS_Store].freeze
UNBREWED_EXCLUDE_PATHS = %w[
+ */.keepme
.github/*
bin/brew
completions/zsh/_brew
@@ -126,7 +140,7 @@ def list
def list_unbrewed
dirs = HOMEBREW_PREFIX.subdirs.map { |dir| dir.basename.to_s }
- dirs -= %w[Library Cellar .git]
+ dirs -= %w[Library Cellar Caskroom .git]
# Exclude cache, logs, and repository, if they are located under the prefix.
[HOMEBREW_CACHE, HOMEBREW_LOGS, HOMEBREW_REPOSITORY].each do |dir| | true |
Other | Homebrew | brew | 5adb76a5babdccd2c4edfb8752ac979ed14716ca.json | list: fix flag handling.
Fix `-1` and other flags so they're handled correctly with casks. Use
the "right" exceptions for declaring invalid combinations and change
their parent class so that `--help` is printed nicely too.
Fixes #9033 | docs/Manpage.md | @@ -353,28 +353,28 @@ List all installed formulae or casks
If *`formula`* is provided, summarise the paths within its current keg.
-* `--full-name`:
- Print formulae with fully-qualified names. If `--full-name` is not passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output.
+* `--formula`:
+ List only formulae. `This is the default action on non TTY.`
+* `--cask`:
+ List only casks, or *`cask`* if provided.
* `--unbrewed`:
List files in Homebrew's prefix not installed by Homebrew.
+* `--full-name`:
+ Print formulae with fully-qualified names. If `--full-name` is not passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output.
* `--versions`:
Show the version number for installed formulae, or only the specified formulae if *`formula`* are provided.
* `--multiple`:
Only show formulae with multiple versions installed.
* `--pinned`:
Show the versions of pinned formulae, or only the specified (pinned) formulae if *`formula`* are provided. See also `pin`, `unpin`.
-* `--formula`:
- List only formulae. `This is the default action on non TTY.`
-* `--cask`:
- List only casks, or *`cask`* if provided.
* `-1`:
Force output to be one entry per line. This is the default when output is not to a terminal.
* `-l`:
- List in long format. If the output is to a terminal, a total sum for all the file sizes is printed before the long listing.
+ List formulae in long format. If the output is to a terminal, a total sum for all the file sizes is printed before the long listing.
* `-r`:
- Reverse the order of the sort to list the oldest entries first.
+ Reverse the order of the formulae sort to list the oldest entries first.
* `-t`:
- Sort by time modified, listing most recently modified first.
+ Sort formulae by time modified, listing most recently modified first.
### `log` [*`options`*] [*`formula`*]
| true |
Other | Homebrew | brew | 5adb76a5babdccd2c4edfb8752ac979ed14716ca.json | list: fix flag handling.
Fix `-1` and other flags so they're handled correctly with casks. Use
the "right" exceptions for declaring invalid combinations and change
their parent class so that `--help` is printed nicely too.
Fixes #9033 | manpages/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "October 2020" "Homebrew" "brew"
+.TH "BREW" "1" "November 2020" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS
@@ -512,14 +512,22 @@ List all installed formulae or casks
If \fIformula\fR is provided, summarise the paths within its current keg\.
.
.TP
-\fB\-\-full\-name\fR
-Print formulae with fully\-qualified names\. If \fB\-\-full\-name\fR is not passed, other options (i\.e\. \fB\-1\fR, \fB\-l\fR, \fB\-r\fR and \fB\-t\fR) are passed to \fBls\fR(1) which produces the actual output\.
+\fB\-\-formula\fR
+List only formulae\. \fBThis is the default action on non TTY\.\fR
+.
+.TP
+\fB\-\-cask\fR
+List only casks, or \fIcask\fR if provided\.
.
.TP
\fB\-\-unbrewed\fR
List files in Homebrew\'s prefix not installed by Homebrew\.
.
.TP
+\fB\-\-full\-name\fR
+Print formulae with fully\-qualified names\. If \fB\-\-full\-name\fR is not passed, other options (i\.e\. \fB\-1\fR, \fB\-l\fR, \fB\-r\fR and \fB\-t\fR) are passed to \fBls\fR(1) which produces the actual output\.
+.
+.TP
\fB\-\-versions\fR
Show the version number for installed formulae, or only the specified formulae if \fIformula\fR are provided\.
.
@@ -532,28 +540,20 @@ Only show formulae with multiple versions installed\.
Show the versions of pinned formulae, or only the specified (pinned) formulae if \fIformula\fR are provided\. See also \fBpin\fR, \fBunpin\fR\.
.
.TP
-\fB\-\-formula\fR
-List only formulae\. \fBThis is the default action on non TTY\.\fR
-.
-.TP
-\fB\-\-cask\fR
-List only casks, or \fIcask\fR if provided\.
-.
-.TP
\fB\-1\fR
Force output to be one entry per line\. This is the default when output is not to a terminal\.
.
.TP
\fB\-l\fR
-List in long format\. If the output is to a terminal, a total sum for all the file sizes is printed before the long listing\.
+List formulae in long format\. If the output is to a terminal, a total sum for all the file sizes is printed before the long listing\.
.
.TP
\fB\-r\fR
-Reverse the order of the sort to list the oldest entries first\.
+Reverse the order of the formulae sort to list the oldest entries first\.
.
.TP
\fB\-t\fR
-Sort by time modified, listing most recently modified first\.
+Sort formulae by time modified, listing most recently modified first\.
.
.SS "\fBlog\fR [\fIoptions\fR] [\fIformula\fR]"
Show the \fBgit log\fR for \fIformula\fR, or show the log for the Homebrew repository if no formula is provided\. | true |
Other | Homebrew | brew | f41afe6256995d34c2b189cb951dc4dc2cd6e1b8.json | audit: use the specific url for vifm allowlist
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/rubocops/urls.rb | @@ -22,7 +22,7 @@ class Urls < FormulaCop
https://osxbook.com/book/bonus/chapter8/core/download/gcore
https://naif.jpl.nasa.gov/pub/naif/toolkit/C/MacIntel_OSX_AppleC_64bit/packages/
https://artifacts.videolan.org/x264/release-macos/
- https://github.com/vifm/vifm/releases/download
+ https://github.com/vifm/vifm/releases/download/v0.11/vifm-osx-0.11.tar.bz2
].freeze
# These are formulae that, sadly, require an upstream binary to bootstrap. | false |
Other | Homebrew | brew | b54b022f73628360e109586013b6b22aacd92f5d.json | Keg.for: handle non-existent path.
Otherwise `path.realpath` will raise `Errno::ENOENT` rather than the
expected `NotAKegError`.
Fixes https://github.com/Homebrew/brew/issues/9015 | Library/Homebrew/keg.rb | @@ -183,13 +183,15 @@ def self.find_some_installed_dependents(kegs)
# if path is a file in a keg then this will return the containing Keg object
def self.for(path)
- path = path.realpath
- until path.root?
- return Keg.new(path) if path.parent.parent == HOMEBREW_CELLAR.realpath
+ original_path = path
+ if original_path.exist? && (path = original_path.realpath)
+ until path.root?
+ return Keg.new(path) if path.parent.parent == HOMEBREW_CELLAR.realpath
- path = path.parent.realpath # realpath() prevents root? failing
+ path = path.parent.realpath # realpath() prevents root? failing
+ end
end
- raise NotAKegError, "#{path} is not inside a keg"
+ raise NotAKegError, "#{original_path} is not inside a keg"
end
def self.all | false |
Other | Homebrew | brew | 249088038c1bc410068ce53d8d0b804d38289bda.json | shared_audits: add lidarr to GITHUB_PRERELEASE_ALLOWLIST | Library/Homebrew/utils/shared_audits.rb | @@ -38,6 +38,7 @@ def github_release_data(user, repo, tag)
"freetube" => :all,
"gitless" => "0.8.8",
"home-assistant" => :all,
+ "lidarr" => :all,
"nuclear" => :all,
"pock" => :all,
"riff" => "0.5.0", | false |
Other | Homebrew | brew | 62984b956e4e2fc1dced4998dc913421babde8bf.json | relocate requirement tests | Library/Homebrew/test/java_requirement_spec.rb | @@ -1,131 +0,0 @@
-# typed: false
-# frozen_string_literal: true
-
-require "cli/args"
-require "requirements/java_requirement"
-
-describe JavaRequirement do
- subject { described_class.new([]) }
-
- before do
- ENV["JAVA_HOME"] = nil
- end
-
- describe "#message" do
- its(:message) { is_expected.to match(/Java is required for this software./) }
- end
-
- describe "#inspect" do
- subject { described_class.new(%w[1.7+]) }
-
- its(:inspect) { is_expected.to eq('#<JavaRequirement: version="1.7+" []>') }
- end
-
- describe "#display_s" do
- context "without specific version" do
- its(:display_s) { is_expected.to eq("Java") }
- end
-
- context "with version 1.8" do
- subject { described_class.new(%w[1.8]) }
-
- its(:display_s) { is_expected.to eq("Java = 1.8") }
- end
-
- context "with version 1.8+" do
- subject { described_class.new(%w[1.8+]) }
-
- its(:display_s) { is_expected.to eq("Java >= 1.8") }
- end
- end
-
- describe "#satisfied?" do
- subject { described_class.new(%w[1.8]) }
-
- it "returns false if no `java` executable can be found" do
- allow(File).to receive(:executable?).and_return(false)
- expect(subject).not_to be_satisfied
- end
-
- it "returns true if #preferred_java returns a path" do
- allow(subject).to receive(:preferred_java).and_return(Pathname.new("/usr/bin/java"))
- expect(subject).to be_satisfied
- end
-
- context "when #possible_javas contains paths" do
- let(:path) { mktmpdir }
- let(:java) { path/"java" }
-
- def setup_java_with_version(version)
- IO.write java, <<~SH
- #!/bin/sh
- echo 'java version "#{version}"' 1>&2
- SH
- FileUtils.chmod "+x", java
- end
-
- before do
- allow(subject).to receive(:possible_javas).and_return([java])
- end
-
- context "and 1.7 is required" do
- subject { described_class.new(%w[1.7]) }
-
- it "returns false if all are lower" do
- setup_java_with_version "1.6.0_5"
- expect(subject).not_to be_satisfied
- end
-
- it "returns true if one is equal" do
- setup_java_with_version "1.7.0_5"
- expect(subject).to be_satisfied
- end
-
- it "returns false if all are higher" do
- setup_java_with_version "1.8.0_5"
- expect(subject).not_to be_satisfied
- end
- end
-
- context "and 1.7+ is required" do
- subject { described_class.new(%w[1.7+]) }
-
- it "returns false if all are lower" do
- setup_java_with_version "1.6.0_5"
- expect(subject).not_to be_satisfied
- end
-
- it "returns true if one is equal" do
- setup_java_with_version "1.7.0_5"
- expect(subject).to be_satisfied
- end
-
- it "returns true if one is higher" do
- setup_java_with_version "1.8.0_5"
- expect(subject).to be_satisfied
- end
- end
- end
- end
-
- describe "#suggestion" do
- context "without specific version" do
- its(:suggestion) { is_expected.to match(/brew cask install adoptopenjdk/) }
- its(:cask) { is_expected.to eq("adoptopenjdk") }
- end
-
- context "with version 1.8" do
- subject { described_class.new(%w[1.8]) }
-
- its(:suggestion) { is_expected.to match(%r{brew cask install homebrew/cask-versions/adoptopenjdk8}) }
- its(:cask) { is_expected.to eq("homebrew/cask-versions/adoptopenjdk8") }
- end
-
- context "with version 1.8+" do
- subject { described_class.new(%w[1.8+]) }
-
- its(:suggestion) { is_expected.to match(/brew cask install adoptopenjdk/) }
- its(:cask) { is_expected.to eq("adoptopenjdk") }
- end
- end
-end | true |
Other | Homebrew | brew | 62984b956e4e2fc1dced4998dc913421babde8bf.json | relocate requirement tests | Library/Homebrew/test/requirements/java_requirement_spec.rb | @@ -1,10 +1,17 @@
# typed: false
# frozen_string_literal: true
+require "cli/args"
require "requirements/java_requirement"
describe JavaRequirement do
- describe "initialize" do
+ subject { described_class.new([]) }
+
+ before do
+ ENV["JAVA_HOME"] = nil
+ end
+
+ describe "#initialize" do
it "parses '1.8' tag correctly" do
req = described_class.new(["1.8"])
expect(req.display_s).to eq("Java = 1.8")
@@ -30,4 +37,122 @@
expect(req.display_s).to eq("Java")
end
end
+
+ describe "#message" do
+ its(:message) { is_expected.to match(/Java is required for this software./) }
+ end
+
+ describe "#inspect" do
+ subject { described_class.new(%w[1.7+]) }
+
+ its(:inspect) { is_expected.to eq('#<JavaRequirement: version="1.7+" []>') }
+ end
+
+ describe "#display_s" do
+ context "without specific version" do
+ its(:display_s) { is_expected.to eq("Java") }
+ end
+
+ context "with version 1.8" do
+ subject { described_class.new(%w[1.8]) }
+
+ its(:display_s) { is_expected.to eq("Java = 1.8") }
+ end
+
+ context "with version 1.8+" do
+ subject { described_class.new(%w[1.8+]) }
+
+ its(:display_s) { is_expected.to eq("Java >= 1.8") }
+ end
+ end
+
+ describe "#satisfied?" do
+ subject(:requirement) { described_class.new(%w[1.8]) }
+
+ it "returns false if no `java` executable can be found" do
+ allow(File).to receive(:executable?).and_return(false)
+ expect(requirement).not_to be_satisfied
+ end
+
+ it "returns true if #preferred_java returns a path" do
+ allow(requirement).to receive(:preferred_java).and_return(Pathname.new("/usr/bin/java"))
+ expect(requirement).to be_satisfied
+ end
+
+ context "when #possible_javas contains paths" do
+ let(:path) { mktmpdir }
+ let(:java) { path/"java" }
+
+ def setup_java_with_version(version)
+ IO.write java, <<~SH
+ #!/bin/sh
+ echo 'java version "#{version}"' 1>&2
+ SH
+ FileUtils.chmod "+x", java
+ end
+
+ before do
+ allow(requirement).to receive(:possible_javas).and_return([java])
+ end
+
+ context "and 1.7 is required" do
+ subject(:requirement) { described_class.new(%w[1.7]) }
+
+ it "returns false if all are lower" do
+ setup_java_with_version "1.6.0_5"
+ expect(requirement).not_to be_satisfied
+ end
+
+ it "returns true if one is equal" do
+ setup_java_with_version "1.7.0_5"
+ expect(requirement).to be_satisfied
+ end
+
+ it "returns false if all are higher" do
+ setup_java_with_version "1.8.0_5"
+ expect(requirement).not_to be_satisfied
+ end
+ end
+
+ context "and 1.7+ is required" do
+ subject(:requirement) { described_class.new(%w[1.7+]) }
+
+ it "returns false if all are lower" do
+ setup_java_with_version "1.6.0_5"
+ expect(requirement).not_to be_satisfied
+ end
+
+ it "returns true if one is equal" do
+ setup_java_with_version "1.7.0_5"
+ expect(requirement).to be_satisfied
+ end
+
+ it "returns true if one is higher" do
+ setup_java_with_version "1.8.0_5"
+ expect(requirement).to be_satisfied
+ end
+ end
+ end
+ end
+
+ describe "#suggestion" do
+ context "without specific version" do
+ its(:suggestion) { is_expected.to match(/brew cask install adoptopenjdk/) }
+ its(:cask) { is_expected.to eq("adoptopenjdk") }
+ end
+
+ context "with version 1.8" do
+ subject { described_class.new(%w[1.8]) }
+
+ its(:suggestion) { is_expected.to match(%r{brew cask install homebrew/cask-versions/adoptopenjdk8}) }
+ its(:cask) { is_expected.to eq("homebrew/cask-versions/adoptopenjdk8") }
+ end
+
+ context "with version 1.8+" do
+ subject { described_class.new(%w[1.8+]) }
+
+ its(:suggestion) { is_expected.to match(/brew cask install adoptopenjdk/) }
+ its(:cask) { is_expected.to eq("adoptopenjdk") }
+ end
+ end
end | true |
Other | Homebrew | brew | 62984b956e4e2fc1dced4998dc913421babde8bf.json | relocate requirement tests | Library/Homebrew/test/requirements/x11_requirement_spec.rb | @@ -5,39 +5,41 @@
require "requirements/x11_requirement"
describe X11Requirement do
+ subject(:requirement) { described_class.new([]) }
+
let(:default_name) { "x11" }
describe "#name" do
it "defaults to x11" do
- expect(subject.name).to eq(default_name)
+ expect(requirement.name).to eq(default_name)
end
end
describe "#eql?" do
it "returns true if the requirements are equal" do
other = described_class.new
- expect(subject).to eql(other)
+ expect(requirement).to eql(other)
end
end
describe "#modify_build_environment" do
it "calls ENV#x11" do
- allow(subject).to receive(:satisfied?).and_return(true)
+ allow(requirement).to receive(:satisfied?).and_return(true)
expect(ENV).to receive(:x11)
- subject.modify_build_environment
+ requirement.modify_build_environment
end
end
describe "#satisfied?", :needs_macos do
it "returns true if X11 is installed" do
expect(MacOS::XQuartz).to receive(:version).and_return("2.7.5")
expect(MacOS::XQuartz).to receive(:installed?).and_return(true)
- expect(subject).to be_satisfied
+ expect(requirement).to be_satisfied
end
it "returns false if X11 is not installed" do
expect(MacOS::XQuartz).to receive(:installed?).and_return(false)
- expect(subject).not_to be_satisfied
+ expect(requirement).not_to be_satisfied
end
end
end | true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/requirement.rb | @@ -126,7 +126,7 @@ def inspect
end
def display_s
- name
+ name.capitalize
end
def mktemp(&block) | true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/requirements/java_requirement.rb | @@ -55,9 +55,9 @@ def display_s
else
">="
end
- "#{name} #{op} #{version_without_plus}"
+ "#{name.capitalize} #{op} #{version_without_plus}"
else
- name
+ name.capitalize
end
end
| true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/requirements/macos_requirement.rb | @@ -71,7 +71,7 @@ def inspect
end
def display_s
- return "macOS is required" unless version_specified?
+ return "macOS" unless version_specified?
"macOS #{@comparator} #{@version}"
end | true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/requirements/osxfuse_requirement.rb | @@ -7,8 +7,14 @@
#
# @api private
class OsxfuseRequirement < Requirement
+ extend T::Sig
cask "osxfuse"
fatal true
+
+ sig { returns(String) }
+ def display_s
+ "FUSE"
+ end
end
require "extend/os/requirements/osxfuse_requirement" | true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/requirements/xcode_requirement.rb | @@ -48,6 +48,12 @@ def message
def inspect
"#<#{self.class.name}: #{tags.inspect} version=#{@version.inspect}>"
end
+
+ def display_s
+ return name.capitalize unless @version
+
+ "#{name.capitalize} >= #{@version}"
+ end
end
require "extend/os/requirements/xcode_requirement" | true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/test/java_requirement_spec.rb | @@ -23,19 +23,19 @@
describe "#display_s" do
context "without specific version" do
- its(:display_s) { is_expected.to eq("java") }
+ its(:display_s) { is_expected.to eq("Java") }
end
context "with version 1.8" do
subject { described_class.new(%w[1.8]) }
- its(:display_s) { is_expected.to eq("java = 1.8") }
+ its(:display_s) { is_expected.to eq("Java = 1.8") }
end
context "with version 1.8+" do
subject { described_class.new(%w[1.8+]) }
- its(:display_s) { is_expected.to eq("java >= 1.8") }
+ its(:display_s) { is_expected.to eq("Java >= 1.8") }
end
end
| true |
Other | Homebrew | brew | a232ac8b1e451aa1345206f8f5043f183b1e6988.json | requirements: improve display in `brew info` | Library/Homebrew/test/requirements/java_requirement_spec.rb | @@ -7,27 +7,27 @@
describe "initialize" do
it "parses '1.8' tag correctly" do
req = described_class.new(["1.8"])
- expect(req.display_s).to eq("java = 1.8")
+ expect(req.display_s).to eq("Java = 1.8")
end
it "parses '9' tag correctly" do
req = described_class.new(["9"])
- expect(req.display_s).to eq("java = 9")
+ expect(req.display_s).to eq("Java = 9")
end
it "parses '9+' tag correctly" do
req = described_class.new(["9+"])
- expect(req.display_s).to eq("java >= 9")
+ expect(req.display_s).to eq("Java >= 9")
end
it "parses '11' tag correctly" do
req = described_class.new(["11"])
- expect(req.display_s).to eq("java = 11")
+ expect(req.display_s).to eq("Java = 11")
end
it "parses bogus tag correctly" do
req = described_class.new(["bogus1.8"])
- expect(req.display_s).to eq("java")
+ expect(req.display_s).to eq("Java")
end
end
end | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/cmd/link.rb | @@ -4,6 +4,7 @@
require "ostruct"
require "caveats"
require "cli/parser"
+require "unlink"
module Homebrew
module_function
@@ -66,26 +67,27 @@ def link
next
end
+ formula = keg.to_formula
+
if keg_only
- if Homebrew.default_prefix?
- f = keg.to_formula
- if f.keg_only_reason.by_macos?
- caveats = Caveats.new(f)
- opoo <<~EOS
- Refusing to link macOS provided/shadowed software: #{keg.name}
- #{caveats.keg_only_text(skip_reason: true).strip}
- EOS
- next
- end
+ if Homebrew.default_prefix? && formula.keg_only_reason.by_macos?
+ caveats = Caveats.new(formula)
+ opoo <<~EOS
+ Refusing to link macOS provided/shadowed software: #{keg.name}
+ #{caveats.keg_only_text(skip_reason: true).strip}
+ EOS
+ next
end
- unless args.force?
+ if !formula.keg_only_reason.versioned_formula? && !args.force?
opoo "#{keg.name} is keg-only and must be linked with --force"
puts_keg_only_path_message(keg)
next
end
end
+ Unlink.unlink_versioned_formulae(formula, verbose: args.verbose?)
+
keg.lock do
print "Linking #{keg}... "
puts if args.verbose? | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/cmd/switch.rb | @@ -17,6 +17,7 @@ def switch_args
EOS
named 2
+ hide_from_man_page!
end
end
@@ -28,6 +29,8 @@ def switch
odie "#{name} not found in the Cellar." unless rack.directory?
+ # odeprecated "`brew switch`", "`brew link` @-versioned formulae"
+
versions = rack.subdirs
.map { |d| Keg.new(d).version }
.sort | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/cmd/unlink.rb | @@ -3,6 +3,7 @@
require "ostruct"
require "cli/parser"
+require "unlink"
module Homebrew
module_function
@@ -36,11 +37,7 @@ def unlink
next
end
- keg.lock do
- print "Unlinking #{keg}... "
- puts if args.verbose?
- puts "#{keg.unlink(**options)} symlinks removed"
- end
+ Unlink.unlink(keg, dry_run: args.dry_run?, verbose: args.verbose?)
end
end
end | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/formula.rb | @@ -414,12 +414,12 @@ def versioned_formula?
name.include?("@")
end
- # Returns any `@`-versioned formulae for an non-`@`-versioned formula.
+ # Returns any `@`-versioned formulae for any formula (including versioned formulae).
def versioned_formulae
- return [] if versioned_formula?
+ Pathname.glob(path.to_s.gsub(/(@[\d.]+)?\.rb$/, "@*.rb")).map do |versioned_path|
+ next if versioned_path == path
- Pathname.glob(path.to_s.gsub(/\.rb$/, "@*.rb")).map do |path|
- Formula[path.basename(".rb").to_s]
+ Formula[versioned_path.basename(".rb").to_s]
rescue FormulaUnavailableError
nil
end.compact.sort_by(&:version).reverse | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/formula_installer.rb | @@ -22,6 +22,7 @@
require "find"
require "utils/spdx"
require "deprecate_disable"
+require "unlink"
# Installer for a formula.
#
@@ -884,6 +885,8 @@ def link(keg)
keg.remove_linked_keg_record
end
+ Homebrew::Unlink.unlink_versioned_formulae(formula, verbose: verbose?)
+
link_overwrite_backup = {} # Hash: conflict file -> backup file
backup_dir = HOMEBREW_CACHE/"Backup"
| true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/keg.rb | @@ -335,6 +335,7 @@ def uninstall
EOS
end
+ # TODO: refactor to use keyword arguments.
def unlink(**options)
ObserverPathnameExtension.reset_counts!
@@ -448,6 +449,7 @@ def oldname_opt_record
end
end
+ # TODO: refactor to use keyword arguments.
def link(**options)
raise AlreadyLinkedError, self if linked_keg_record.directory?
| true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | Library/Homebrew/unlink.rb | @@ -0,0 +1,30 @@
+# typed: false
+# frozen_string_literal: true
+
+module Homebrew
+ # Provides helper methods for unlinking formulae and kegs with consistent output.
+ module Unlink
+ module_function
+
+ def unlink_versioned_formulae(formula, verbose: false)
+ formula.versioned_formulae
+ .select(&:linked?)
+ .map(&:any_installed_keg)
+ .compact
+ .select(&:directory?)
+ .each do |keg|
+ unlink(keg, verbose: verbose)
+ end
+ end
+
+ def unlink(keg, dry_run: false, verbose: false)
+ options = { dry_run: dry_run, verbose: verbose }
+
+ keg.lock do
+ print "Unlinking #{keg}... "
+ puts if verbose
+ puts "#{keg.unlink(**options)} symlinks removed"
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | docs/Manpage.md | @@ -537,10 +537,6 @@ Print export statements. When run in a shell, this installation of Homebrew will
The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times.
Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile`, `~/.bash_profile`, or `~/.zprofile`) with: `eval $(brew shellenv)`
-### `switch` *`formula`* *`version`*
-
-Symlink all of the specified *`version`* of *`formula`*'s installation into Homebrew's prefix.
-
### `tap` [*`options`*] [*`user`*`/`*`repo`*] [*`URL`*]
Tap a formula repository. | true |
Other | Homebrew | brew | 849034c368ba5be6de0b0f9d5e4eb4d1917dc42c.json | Improve @-versioned formulae linking.
The way we currently handle @-versioned formulae linking is pretty
labourius:
- it requires extensive use of `link_overwrite` to avoid the `link`
stage failing on certain install/upgrade scenarios
- we teach people to use `brew link --force` whenever they wish to
link a versioned formulae when it's pretty obvious what's expected
in that situation
Instead, let's:
- automatically unlink other versioned formulae when linking a
versioned formula (either through `brew link` or `install`/`upgrade`
/`reinstall`)
- notify the user what we've done (with the same messaging as if
they had run `brew link` manually) | manpages/brew.1 | @@ -773,9 +773,6 @@ Print export statements\. When run in a shell, this installation of Homebrew wil
.P
The variables \fBHOMEBREW_PREFIX\fR, \fBHOMEBREW_CELLAR\fR and \fBHOMEBREW_REPOSITORY\fR are also exported to avoid querying them multiple times\. Consider adding evaluation of this command\'s output to your dotfiles (e\.g\. \fB~/\.profile\fR, \fB~/\.bash_profile\fR, or \fB~/\.zprofile\fR) with: \fBeval $(brew shellenv)\fR
.
-.SS "\fBswitch\fR \fIformula\fR \fIversion\fR"
-Symlink all of the specified \fIversion\fR of \fIformula\fR\'s installation into Homebrew\'s prefix\.
-.
.SS "\fBtap\fR [\fIoptions\fR] [\fIuser\fR\fB/\fR\fIrepo\fR] [\fIURL\fR]"
Tap a formula repository\.
. | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/linux/cleaner.rb | @@ -4,6 +4,8 @@
class Cleaner
private
+ extend T::Sig
+ sig { params(path: Pathname).returns(T.nilable(T::Boolean)) }
def executable_path?(path)
path.elf? || path.text_executable?
end | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/linux/formula_cellar_checks.rb | @@ -2,6 +2,8 @@
# frozen_string_literal: true
module FormulaCellarChecks
+ extend T::Sig
+ sig { params(filename: Pathname).returns(T::Boolean) }
def valid_library_extension?(filename)
generic_valid_library_extension?(filename) || filename.basename.to_s.include?(".so.")
end | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/linux/software_spec.rb | @@ -2,6 +2,8 @@
# frozen_string_literal: true
class BottleSpecification
+ extend T::Sig
+ sig { returns(T::Boolean) }
def skip_relocation?
false
end | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/linux/utils/analytics.rb | @@ -4,12 +4,15 @@
module Utils
module Analytics
class << self
+ extend T::Sig
+ sig { returns(String) }
def formula_path
return generic_formula_path if Homebrew::EnvConfig.force_homebrew_on_linux?
"formula-linux"
end
+ sig { returns(String) }
def analytics_path
return generic_analytics_path if Homebrew::EnvConfig.force_homebrew_on_linux?
| true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/mac/formula_support.rb | @@ -2,6 +2,8 @@
# frozen_string_literal: true
class KegOnlyReason
+ extend T::Sig
+ sig { returns(T::Boolean) }
def applicable?
true
end | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/mac/hardware.rb | @@ -2,6 +2,8 @@
# frozen_string_literal: true
module Hardware
+ extend T::Sig
+ sig { params(version: T.nilable(Version)).returns(Symbol) }
def self.oldest_cpu(version = MacOS.version)
if CPU.arch == :arm64
:arm_vortex_tempest | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/mac/missing_formula.rb | @@ -8,7 +8,10 @@
module Homebrew
module MissingFormula
+ extend T::Sig
class << self
+ extend T::Sig
+ sig { params(name: String).returns(T.nilable(String)) }
def disallowed_reason(name)
case name.downcase
when "xcode"
@@ -33,12 +36,14 @@ def disallowed_reason(name)
end
end
+ sig { params(name: String, silent: T::Boolean, show_info: T::Boolean).returns(T.nilable(String)) }
def cask_reason(name, silent: false, show_info: false)
return if silent
suggest_command(name, show_info ? "info" : "install")
end
+ sig { params(name: String, command: String).returns(T.nilable(String)) }
def suggest_command(name, command)
suggestion = <<~EOS
Found a cask named "#{name}" instead. Try | true |
Other | Homebrew | brew | 55dc8bbada63593bc5d4a8cdde6509ccd587f438.json | Fix strict typecheck errors. | Library/Homebrew/extend/os/mac/utils/analytics.rb | @@ -4,6 +4,8 @@
module Utils
module Analytics
class << self
+ extend T::Sig
+ sig { returns(String) }
def custom_prefix_label
"non-/usr/local"
end | true |
Other | Homebrew | brew | ffe827ad0e63dfbeed357b50916fe404409176a4.json | Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.
While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.
Fixes #8997 | Library/Homebrew/formula.rb | @@ -1477,21 +1477,10 @@ def self.each(&block)
end
end
- # Clear cache of .racks
- def self.clear_racks_cache
- @racks = nil
- end
-
- # Clear caches of .racks and .installed.
- def self.clear_installed_formulae_cache
- clear_racks_cache
- @installed = nil
- end
-
# An array of all racks currently installed.
# @private
def self.racks
- @racks ||= if HOMEBREW_CELLAR.directory?
+ Formula.cache[:racks] ||= if HOMEBREW_CELLAR.directory?
HOMEBREW_CELLAR.subdirs.reject do |rack|
rack.symlink? || rack.basename.to_s.start_with?(".") || rack.subdirs.empty?
end
@@ -1503,7 +1492,7 @@ def self.racks
# An array of all installed {Formula}
# @private
def self.installed
- @installed ||= racks.flat_map do |rack|
+ Formula.cache[:installed] ||= racks.flat_map do |rack|
Formulary.from_rack(rack)
rescue
[] | true |
Other | Homebrew | brew | ffe827ad0e63dfbeed357b50916fe404409176a4.json | Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.
While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.
Fixes #8997 | Library/Homebrew/formula_installer.rb | @@ -854,10 +854,11 @@ def build
end
def link(keg)
+ Formula.clear_cache
+
unless link_keg
begin
keg.optlink(verbose: verbose?)
- Formula.clear_cache
rescue Keg::LinkError => e
onoe "Failed to create #{formula.opt_prefix}"
puts "Things that depend on #{formula.full_name} will probably not build." | true |
Other | Homebrew | brew | ffe827ad0e63dfbeed357b50916fe404409176a4.json | Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.
While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.
Fixes #8997 | Library/Homebrew/tab.rb | @@ -355,7 +355,7 @@ def to_json(options = nil)
def write
# If this is a new installation, the cache of installed formulae
# will no longer be valid.
- Formula.clear_installed_formulae_cache unless tabfile.exist?
+ Formula.clear_cache unless tabfile.exist?
self.class.cache[tabfile] = self
tabfile.atomic_write(to_json) | true |
Other | Homebrew | brew | ffe827ad0e63dfbeed357b50916fe404409176a4.json | Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.
While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.
Fixes #8997 | Library/Homebrew/test/keg_spec.rb | @@ -36,7 +36,6 @@ def setup_test_keg(name, version)
end
specify "::all" do
- Formula.clear_racks_cache
expect(described_class.all).to eq([keg])
end
| true |
Other | Homebrew | brew | ffe827ad0e63dfbeed357b50916fe404409176a4.json | Fix upgrading dependents on missing keg
Ensure that we don't try to check for broken linkage in a keg that
doesn't exist. Furthermore, fix the reason we checked for the keg that
doesn't exist by `Formula.clear_cache`.
While here, I noticed that there was other methods of caching at use in
`Formula` so consolidate them to be consistent.
Fixes #8997 | Library/Homebrew/upgrade.rb | @@ -128,6 +128,7 @@ def check_broken_dependents(installed_formulae)
.select do |f|
keg = f.any_installed_keg
next unless keg
+ next unless keg.directory?
LinkageChecker.new(keg, cache_db: db)
.broken_library_linkage?
@@ -186,7 +187,7 @@ def check_installed_dependents(args:)
upgrade_formulae(upgradeable_dependents, args: args)
- # Refresh installed formulae after upgrading
+ # Update installed formulae after upgrading
installed_formulae = FormulaInstaller.installed.to_a
# Assess the dependents tree again now we've upgraded. | true |
Other | Homebrew | brew | 75e2f1a2a9cd3d09aeae7a5fbbae81c1edc2045e.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/gems/simplecov@0.19.0.rbi | @@ -1,7 +0,0 @@
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `simplecov` gem.
-# Please instead update this file by running `tapioca sync --exclude json`.
-
-# typed: true
-
- | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.