SIGN IN SIGN UP
Homebrew / brew UNCLAIMED

🍺 The missing package manager for macOS (or Linux)

0 0 185 Ruby

system_command: avoid loading plist and URI libraries at startup

These two requires were loaded globally on every brew invocation via
extend/pathname → system_command, but neither was needed at startup:

- `plist`: only used in Result#plist method body; deferred with a lazy
  require inside the method. This avoids loading the plist gem and its
  transitive deps (cgi, date, stringio) for commands that don't parse
  plist output (the vast majority).

- `uri`: URI::Generic only appears in Sorbet sigs. Changed the six
  affected sigs to T::Sig::WithoutRuntime.sig so the sig blocks are
  not evaluated at runtime, allowing the require to be dropped
  entirely. Added an explicit require "stringio" since that was a
  transitive dep of plist relied on by utils/tty.rb.

Also adds an AGENTS.md note to always use `./bin/brew ruby` instead
of the system Ruby when running Ruby directly.
D
Douglas Eichelberger committed
2677aedea8eaad819c4a00beaed2278b687ab7d7
Parent: b9763ee