Top Level Namespace

Defined Under Namespace

Modules: APIHashable, Cachable, Cask, Commands, Context, Debrew, Dependable, DependenciesHelpers, DeprecateDisable, DiskUsageExtension, ELFShim, EnvActivation, Formatter, FormulaCellarChecks, FormulaClassUnavailableErrorModule, FormulaUnreadableErrorModule, Formulary, GitHub, Hardware, Homebrew, Ignorable, InstallRenamed, InstalledDependents, Kernel, Language, MacOSVersionErrorCompat, MacOSVersions, MachOShim, Metafiles, OS, OnSystem, Patch, Predicable, PyPI, Readall, Repology, RuboCop, SPDX, SharedAudits, SharedEnvExtension, Stdenv, Superenv, SystemConfig, TimeRemaining, Tty, UnpackStrategy, Utils, Warnings Classes: AbstractCoreTap, AbstractDownloadStrategy, AbstractFileDownloadStrategy, ArchRequirement, Array, Attr, BazaarDownloadStrategy, Bottle, BottleFormulaUnavailableError, BottleSpecification, Build, BuildEnvironment, BuildError, BuildFlagsError, BuildOptions, CVSDownloadStrategy, CacheStore, CacheStoreDatabase, CannotInstallFormulaError, CaskDependent, CaskDescriptionCacheStore, CaskLock, Caveats, Checksum, ChecksumMismatchError, ChecksumMissingError, ChildProcessError, Cleaner, CodesignRequirement, CompilerFailure, CompilerSelectionError, CompilerSelector, CoreCaskTap, CoreTap, CurlApacheMirrorDownloadStrategy, CurlDownloadStrategy, CurlDownloadStrategyError, CurlGitHubPackagesDownloadStrategy, CurlPostDownloadStrategy, CxxStdlib, CyclicDependencyError, DATAPatch, Dependencies, Dependency, DependencyCollector, DeprecatedOption, DescriptionCacheStore, Descriptions, DownloadError, DownloadStrategyDetector, Downloadable, DuplicateResourceError, ENV, EmbeddedPatch, ErrorDuringExecution, ExternalPatch, FalseClass, Formula, FormulaAmbiguousPythonError, FormulaClassUnavailableError, FormulaConflict, FormulaConflictError, FormulaInfo, FormulaInstallationAlreadyAttemptedError, FormulaInstaller, FormulaLock, FormulaOrCaskUnavailableError, FormulaOrCaskUnspecifiedError, FormulaPin, FormulaSpecificationError, FormulaUnavailableError, FormulaUnknownPythonError, FormulaUnreadableError, FormulaUnspecifiedError, FormulaValidationError, FormulaVersions, FossilDownloadStrategy, GitDownloadStrategy, GitHubArtifactDownloadStrategy, GitHubGitDownloadStrategy, GitHubPackages, GitHubReleases, GitHubRunner, GitHubRunnerMatrix, GitRepository, Hash, HeadSoftwareSpec, HomebrewCurlDownloadStrategy, HomebrewCurlDownloadStrategyError, IO, IgnoreDirectiveDocstringParser, Keg, KegOnlyReason, KegUnspecifiedError, LazyObject, LinkageCacheStore, LinkageChecker, LinuxRequirement, LinuxRunnerSpec, Livecheck, LocalBottleDownloadStrategy, Locale, LockFile, MacOSRequirement, MacOSRunnerSpec, MacOSVersion, Mechanize, MercurialDownloadStrategy, Messages, MethodDeprecatedError, Migrator, MissingApplyError, Mktemp, Module, MultipleVersionsInstalledError, NilClass, NoSuchKegError, NoUnzipCurlDownloadStrategy, NotAKegError, Numeric, Object, OperationInProgressError, Option, Options, PATH, Pathname, PkgVersion, PourBottleCheck, PrettyListing, Reporter, ReporterHub, Requirement, Requirements, Resource, ResourceMissingError, ResourceStageContext, Sandbox, ShebangDetectionError, SoftwareSpec, String, StringInreplaceExtension, StringPatch, SubversionDownloadStrategy, Symbol, SystemCommand, Tab, Tap, TapAlreadyTappedError, TapConfig, TapCoreRemoteMismatchError, TapFormulaAmbiguityError, TapFormulaClassUnavailableError, TapFormulaOrCaskUnavailableError, TapFormulaUnavailableError, TapFormulaUnreadableError, TapFormulaWithOldnameAmbiguityError, TapNoCustomRemoteError, TapRemoteMismatchError, TapUnavailableError, TestRunnerFormula, Time, TrueClass, URL, UnbottledError, UnsatisfiedRequirements, UnsupportedInstallationMethod, UsageError, User, UsesFromMacOSDependency, VCSDownloadStrategy, Version, XcodeRequirement

Constant Summary collapse

TEST_TIMEOUT_SECONDS =
5 * 60
HOMEBREW_API_DEFAULT_DOMAIN =
ENV.fetch("HOMEBREW_API_DEFAULT_DOMAIN").freeze
HOMEBREW_BOTTLE_DEFAULT_DOMAIN =
ENV.fetch("HOMEBREW_BOTTLE_DEFAULT_DOMAIN").freeze
HOMEBREW_BREW_DEFAULT_GIT_REMOTE =
ENV.fetch("HOMEBREW_BREW_DEFAULT_GIT_REMOTE").freeze
HOMEBREW_CORE_DEFAULT_GIT_REMOTE =
ENV.fetch("HOMEBREW_CORE_DEFAULT_GIT_REMOTE").freeze
HOMEBREW_DEFAULT_CACHE =
ENV.fetch("HOMEBREW_DEFAULT_CACHE").freeze
HOMEBREW_DEFAULT_LOGS =
ENV.fetch("HOMEBREW_DEFAULT_LOGS").freeze
HOMEBREW_DEFAULT_TEMP =
ENV.fetch("HOMEBREW_DEFAULT_TEMP").freeze
HOMEBREW_REQUIRED_RUBY_VERSION =
ARGV.first.freeze
HOMEBREW_PRODUCT =
ENV.fetch("HOMEBREW_PRODUCT").freeze
HOMEBREW_VERSION =
ENV.fetch("HOMEBREW_VERSION").freeze
HOMEBREW_WWW =
"https://brew.sh"
HOMEBREW_API_WWW =
"https://formulae.brew.sh"
HOMEBREW_DOCS_WWW =
"https://docs.brew.sh"
HOMEBREW_SYSTEM =
ENV.fetch("HOMEBREW_SYSTEM").freeze
HOMEBREW_PROCESSOR =
ENV.fetch("HOMEBREW_PROCESSOR").freeze
HOMEBREW_PHYSICAL_PROCESSOR =
ENV.fetch("HOMEBREW_PHYSICAL_PROCESSOR").freeze
HOMEBREW_BREWED_CURL_PATH =
Pathname(ENV.fetch("HOMEBREW_BREWED_CURL_PATH")).freeze
HOMEBREW_USER_AGENT_CURL =
ENV.fetch("HOMEBREW_USER_AGENT_CURL").freeze
HOMEBREW_USER_AGENT_RUBY =
"#{ENV.fetch("HOMEBREW_USER_AGENT")} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
HOMEBREW_USER_AGENT_FAKE_SAFARI =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 " \
"(KHTML, like Gecko) Version/17.0 Safari/605.1.15"
HOMEBREW_GITHUB_PACKAGES_AUTH =
ENV.fetch("HOMEBREW_GITHUB_PACKAGES_AUTH").freeze
HOMEBREW_DEFAULT_PREFIX =
ENV.fetch("HOMEBREW_GENERIC_DEFAULT_PREFIX").freeze
HOMEBREW_DEFAULT_REPOSITORY =
ENV.fetch("HOMEBREW_GENERIC_DEFAULT_REPOSITORY").freeze
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX =
ENV.fetch("HOMEBREW_MACOS_ARM_DEFAULT_PREFIX").freeze
HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY =
ENV.fetch("HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY").freeze
HOMEBREW_LINUX_DEFAULT_PREFIX =
ENV.fetch("HOMEBREW_LINUX_DEFAULT_PREFIX").freeze
HOMEBREW_LINUX_DEFAULT_REPOSITORY =
ENV.fetch("HOMEBREW_LINUX_DEFAULT_REPOSITORY").freeze
HOMEBREW_PREFIX_PLACEHOLDER =
"$HOMEBREW_PREFIX"
HOMEBREW_CELLAR_PLACEHOLDER =
"$HOMEBREW_CELLAR"
HOMEBREW_HOME_PLACEHOLDER =

Needs a leading slash to avoid File.expand.path complaining about non-absolute home.

"/$HOME"
HOMEBREW_CASK_APPDIR_PLACEHOLDER =
"$APPDIR"
HOMEBREW_MACOS_NEWEST_UNSUPPORTED =
ENV.fetch("HOMEBREW_MACOS_NEWEST_UNSUPPORTED").freeze
HOMEBREW_MACOS_OLDEST_SUPPORTED =
ENV.fetch("HOMEBREW_MACOS_OLDEST_SUPPORTED").freeze
HOMEBREW_MACOS_OLDEST_ALLOWED =
ENV.fetch("HOMEBREW_MACOS_OLDEST_ALLOWED").freeze
HOMEBREW_PULL_API_REGEX =
%r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}.freeze
HOMEBREW_PULL_OR_COMMIT_URL_REGEX =
%r[https://github\.com/([\w-]+)/([\w-]+)?/(?:pull/(\d+)|commit/[0-9a-fA-F]{4,40})].freeze
HOMEBREW_BOTTLES_EXTNAME_REGEX =
/\.([a-z0-9_]+)\.bottle\.(?:(\d+)\.)?tar\.gz$/.freeze
ORIGINAL_PATHS =
PATH.new(ENV.fetch("HOMEBREW_PATH")).map do |p|
  Pathname.new(p).expand_path
rescue
  nil
end.compact.freeze
SOURCE_PATH =
(HOMEBREW_LIBRARY_PATH/"manpages").freeze
TARGET_MAN_PATH =
(HOMEBREW_REPOSITORY/"manpages").freeze
TARGET_DOC_PATH =
(HOMEBREW_REPOSITORY/"docs").freeze
BUG_REPORTS_URL =
"https://github.com/Homebrew/homebrew-cask#reporting-bugs"
COMMAND_DESC_WIDTH =
80
OPTION_DESC_WIDTH =
45
HIDDEN_DESC_PLACEHOLDER =
"@@HIDDEN@@"
GZIP_BUFFER_SIZE =

Apple’s gzip also uses zlib so use the same buffer size here. https://github.com/apple-oss-distributions/file_cmds/blob/file_cmds-400/gzip/gzip.c#L147

64 * 1024
FORMULA_COMPONENT_PRECEDENCE_LIST =
T.let([
  [{ name: :include,   type: :method_call }],
  [{ name: :desc,      type: :method_call }],
  [{ name: :homepage,  type: :method_call }],
  [{ name: :url,       type: :method_call }],
  [{ name: :mirror,    type: :method_call }],
  [{ name: :version,   type: :method_call }],
  [{ name: :sha256,    type: :method_call }],
  [{ name: :license, type: :method_call }],
  [{ name: :revision, type: :method_call }],
  [{ name: :version_scheme, type: :method_call }],
  [{ name: :head,      type: :method_call }],
  [{ name: :stable,    type: :block_call }],
  [{ name: :livecheck, type: :block_call }],
  [{ name: :bottle,    type: :block_call }],
  [{ name: :pour_bottle?, type: :block_call }],
  [{ name: :head,      type: :block_call }],
  [{ name: :bottle,    type: :method_call }],
  [{ name: :keg_only,  type: :method_call }],
  [{ name: :option,    type: :method_call }],
  [{ name: :deprecated_option, type: :method_call }],
  [{ name: :disable!, type: :method_call }],
  [{ name: :deprecate!, type: :method_call }],
  [{ name: :depends_on, type: :method_call }],
  [{ name: :uses_from_macos, type: :method_call }],
  [{ name: :on_macos, type: :block_call }],
  *MacOSVersion::SYMBOLS.keys.map do |os_name|
    [{ name: :"on_#{os_name}", type: :block_call }]
  end,
  [{ name: :on_system, type: :block_call }],
  [{ name: :on_linux, type: :block_call }],
  [{ name: :on_arm, type: :block_call }],
  [{ name: :on_intel, type: :block_call }],
  [{ name: :conflicts_with, type: :method_call }],
  [{ name: :skip_clean, type: :method_call }],
  [{ name: :cxxstdlib_check, type: :method_call }],
  [{ name: :link_overwrite, type: :method_call }],
  [{ name: :fails_with, type: :method_call }, { name: :fails_with, type: :block_call }],
  [{ name: :go_resource, type: :block_call }, { name: :resource, type: :block_call }],
  [{ name: :patch, type: :method_call }, { name: :patch, type: :block_call }],
  [{ name: :needs, type: :method_call }],
  [{ name: :install, type: :method_definition }],
  [{ name: :post_install, type: :method_definition }],
  [{ name: :caveats, type: :method_definition }],
  [{ name: :plist_options, type: :method_call }, { name: :plist, type: :method_definition }],
  [{ name: :test, type: :block_call }],
].freeze, T::Array[[{ name: Symbol, type: Symbol }]])
OFFICIAL_CASK_TAPS =
%w[
  cask
  cask-fonts
  cask-versions
].freeze
OFFICIAL_CMD_TAPS =
{
  "homebrew/aliases"           => ["alias", "unalias"],
  "homebrew/autoupdate"        => ["autoupdate"],
  "homebrew/bundle"            => ["bundle"],
  "homebrew/command-not-found" => ["command-not-found-init", "which-formula", "which-update"],
  "homebrew/test-bot"          => ["test-bot"],
  "homebrew/services"          => ["services"],
}.freeze
DEPRECATED_OFFICIAL_TAPS =
%w[
  apache
  binary
  cask-drivers
  cask-eid
  completions
  devel-only
  dupes
  emacs
  fuse
  games
  gui
  head-only
  livecheck
  nginx
  php
  python
  science
  tex
  versions
  x11
].freeze
HOMEBREW_TAP_FORMULA_REGEX =

Match taps’ formulae, e.g. someuser/sometap/someformula

T.let(%r{^([\w-]+)/([\w-]+)/([\w+-.@]+)$}.freeze, Regexp)
HOMEBREW_TAP_CASK_REGEX =

Match taps’ casks, e.g. someuser/sometap/somecask

T.let(%r{^([\w-]+)/([\w-]+)/([a-z0-9\-_]+)$}.freeze, Regexp)
HOMEBREW_MAIN_TAP_CASK_REGEX =

Match main cask taps’ casks, e.g. homebrew/cask/somecask or somecask

T.let(%r{^([Hh]omebrew/(?:homebrew-)?cask/)?[a-z0-9\-_]+$}.freeze, Regexp)
HOMEBREW_TAP_DIR_REGEX =

Match taps’ directory paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap

T.let(
  %r{#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Taps/(?<user>[\w-]+)/(?<repo>[\w-]+)}.freeze, Regexp
)
HOMEBREW_TAP_PATH_REGEX =

Match taps’ formula paths, e.g. HOMEBREW_LIBRARY/Taps/someuser/sometap/someformula

T.let(Regexp.new(HOMEBREW_TAP_DIR_REGEX.source + %r{(?:/.*)?$}.source).freeze, Regexp)
HOMEBREW_CASK_TAP_CASK_REGEX =

Match official taps’ casks, e.g. homebrew/cask/somecask or homebrew/cask-versions/somecask

T.let(%r{^(?:([Cc]askroom)/(cask|versions)|([Hh]omebrew)/(?:homebrew-)?(cask|cask-[\w-]+))/([\w+-.]+)$}.freeze,
Regexp)
HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX =
T.let(/^(home|linux)brew-/.freeze, Regexp)
BOTTLE_ERB =
<<-EOS
  bottle do
    <% if [HOMEBREW_BOTTLE_DEFAULT_DOMAIN.to_s,
           "#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles"].exclude?(root_url) %>
    root_url "<%= root_url %>"<% if root_url_using.present? %>,
      using: <%= root_url_using %>
    <% end %>
    <% end %>
    <% if rebuild.positive? %>
    rebuild <%= rebuild %>
    <% end %>
    <% sha256_lines.each do |line| %>
    <%= line %>
    <% end %>
  end
EOS
MAXIMUM_STRING_MATCHES =
100
[
  %r{#{Regexp.escape(HOMEBREW_LIBRARY)}/Homebrew/os/(mac|linux)/pkgconfig},
].freeze
HOMEBREW_BREW_FILE =

Path to bin/brew main executable in HOMEBREW_PREFIX

Pathname(ENV.fetch("HOMEBREW_BREW_FILE")).freeze
HOMEBREW_PREFIX =

Where we link under

Pathname(ENV.fetch("HOMEBREW_PREFIX")).freeze
HOMEBREW_REPOSITORY =

Where .git is found

Pathname(ENV.fetch("HOMEBREW_REPOSITORY")).freeze
HOMEBREW_LIBRARY =

Where we store most of Homebrew, taps, and various metadata

Pathname(ENV.fetch("HOMEBREW_LIBRARY")).freeze
HOMEBREW_SHIMS_PATH =

Where shim scripts for various build and SCM tools are stored

(HOMEBREW_LIBRARY/"Homebrew/shims").freeze
HOMEBREW_DATA_PATH =

Where external data that has been incorporated into Homebrew is stored

(HOMEBREW_LIBRARY/"Homebrew/data").freeze
HOMEBREW_LINKED_KEGS =

Where we store symlinks to currently linked kegs

(HOMEBREW_PREFIX/"var/homebrew/linked").freeze
HOMEBREW_PINNED_KEGS =

Where we store symlinks to currently version-pinned kegs

(HOMEBREW_PREFIX/"var/homebrew/pinned").freeze
HOMEBREW_LOCKS =

Where we store lock files

(HOMEBREW_PREFIX/"var/homebrew/locks").freeze
HOMEBREW_CELLAR =

Where we store built products

Pathname(ENV.fetch("HOMEBREW_CELLAR")).freeze
HOMEBREW_CACHE =

Where downloads (bottles, source tarballs, etc.) are cached

Pathname(ENV.fetch("HOMEBREW_CACHE")).freeze
HOMEBREW_CACHE_FORMULA =

Where formulae installed via URL are cached

(HOMEBREW_CACHE/"Formula").freeze
HOMEBREW_LOGS =

Where build, postinstall, and test logs of formulae are written to

Pathname(ENV.fetch("HOMEBREW_LOGS")).expand_path.freeze
HOMEBREW_MAINTAINER_JSON =

Path to the list of Homebrew maintainers as a JSON file

(HOMEBREW_REPOSITORY/".github/maintainers.json").freeze
HOMEBREW_TEMP =

Must use /tmp instead of TMPDIR because long paths break Unix domain sockets

Pathname(ENV.fetch("HOMEBREW_TEMP")).then do |tmp|
  tmp.mkpath unless tmp.exist?
  tmp.realpath
end.freeze
HOMEBREW_RUBY_EXEC_ARGS =

The Ruby path and args to use for forked Ruby calls

[
  RUBY_PATH,
  ENV.fetch("HOMEBREW_RUBY_WARNINGS"),
  ENV.fetch("HOMEBREW_RUBY_DISABLE_OPTIONS"),
].freeze
HOMEBREW_LIBRARY_PATH =
Pathname(__dir__).parent.realpath.freeze
RUBY_PATH =
Pathname.new(RbConfig.ruby).freeze
RUBY_BIN =
RUBY_PATH.dirname.freeze
LINUXBREW_CORE_MIGRATION_LIST =

List of formulae that had a revision in linuxbrew-core that was different than in homebrew-core We will use this list to modify the version_scheme during the migration from linuxbrew-core to homebrew-core.

%w[
  afuse
  apng2gif
  apr-util
  archivemount
  argon2
  arpack
  asciinema
  atdtool
  augustus
  avfs
  bandcamp-dl
  cairo
  ccls
  codemod
  cquery
  credstash
  csvtomd
  cvs
  cxxtest
  datetime-fortran
  ddd
  diceware
  docbook2x
  docker-squash
  doitlive
  double-conversion
  exif
  expect
  fades
  fastme
  fbi-servefiles
  foma
  fontconfig
  freeglut
  ftgl
  gcc@5
  gettext
  gflags
  ghc@8.6
  ghc@8.8
  git-remote-hg
  gitfs
  gitless
  gitup
  glade
  glew
  glui
  goolabs
  gperftools
  grip
  gtkmm
  hdf5@1.8
  htop
  intltool
  io
  jed
  jinja2-cli
  legit
  libebml
  libexif
  libffi
  libgetdata
  libhttpseverywhere
  libproxy
  libtool
  libxslt
  literate-git
  llvm@11
  llvm@7
  llvm@8
  llvm@9
  lua
  lua@5.1
  lua@5.3
  magic-wormhole
  mecab
  mosh
  mps-youtube
  ncview
  notifiers
  openmotif
  osmfilter
  pachi
  packmol
  passpie
  pius
  pkg-config
  plotutils
  plplot
  postgresql@9.4
  postgresql@9.5
  pssh
  pup
  pyvim
  ratfor
  remarshal
  reprepro
  rtv
  s3cmd
  scalapack
  securefs
  softhsm
  statik
  stormssh
  superlu
  tasksh
  termtosvg
  tinyxml
  vsts-cli
  xclip
  xerces-c
  xmlto
  xmltoman
  xmount
  xxhash
  zabbix-cli
].freeze

Instance Method Summary collapse

Methods included from SystemCommand::Mixin

#system_command, #system_command!

Instance Method Details

#initObject



4
5
6
7
8
9
10
11
12
13
# File 'yard/templates/default/docstring/html/setup.rb', line 4

def init
  # `sorbet` is available transitively through the `yard-sorbet` plugin, but we're
  # outside of the standalone sorbet config, so `checked` is enabled by default
  T.bind(self, T.all(Class, YARD::Templates::Template), checked: false)
  super

  return if sections.empty?

  sections[:index].place(:internal).before(:private)
end

#internalObject



15
16
17
18
# File 'yard/templates/default/docstring/html/setup.rb', line 15

def internal
  T.bind(self, YARD::Templates::Template, checked: false)
  erb(:internal) if object.has_tag?(:api) && object.tag(:api).text == "internal"
end

#with_monkey_patchObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'dev-cmd/extract.rb', line 10

def with_monkey_patch
  # Since `method_defined?` is not a supported type guard, the use of `alias_method` below is not typesafe:
  BottleSpecification.class_eval do
    T.unsafe(self).alias_method :old_method_missing, :method_missing if method_defined?(:method_missing)
    define_method(:method_missing) do |*|
      # do nothing
    end
  end

  Module.class_eval do
    T.unsafe(self).alias_method :old_method_missing, :method_missing if method_defined?(:method_missing)
    define_method(:method_missing) do |*|
      # do nothing
    end
  end

  Resource.class_eval do
    T.unsafe(self).alias_method :old_method_missing, :method_missing if method_defined?(:method_missing)
    define_method(:method_missing) do |*|
      # do nothing
    end
  end

  DependencyCollector.class_eval do
    T.unsafe(self).alias_method :old_parse_symbol_spec, :parse_symbol_spec if method_defined?(:parse_symbol_spec)
    define_method(:parse_symbol_spec) do |*|
      # do nothing
    end
  end

  yield
ensure
  BottleSpecification.class_eval do
    if method_defined?(:old_method_missing)
      T.unsafe(self).alias_method :method_missing, :old_method_missing
      undef :old_method_missing
    end
  end

  Module.class_eval do
    if method_defined?(:old_method_missing)
      T.unsafe(self).alias_method :method_missing, :old_method_missing
      undef :old_method_missing
    end
  end

  Resource.class_eval do
    if method_defined?(:old_method_missing)
      T.unsafe(self).alias_method :method_missing, :old_method_missing
      undef :old_method_missing
    end
  end

  DependencyCollector.class_eval do
    if method_defined?(:old_parse_symbol_spec)
      T.unsafe(self).alias_method :parse_symbol_spec, :old_parse_symbol_spec
      undef :old_parse_symbol_spec
    end
  end
end