Files
brew/CONTRIBUTING.md
T
Mike McQuaid 09f0097a10 Add brew benchmark for cold and warm workloads
- a single `brew install` timing conflates metadata-cold,
  archive-cold, archive-warm and fully-warm states, so it cannot
  show which one a performance change actually moved
- each state is now prepared outside the timed region and the
  timed run goes through `hyperfine --warmup 0 --runs 1`
- machines drift by tens of milliseconds across a run, so the
  workload order rotates each repetition rather than repeating:
  no workload is always measured from the same position
- wall times are paired with `$HOMEBREW_PHASE_TIMINGS` totals in
  `benchmark/results.json` so two checkouts can be compared by
  diffing results, which is why no `brew` paths are accepted
- `--exec` passes its arguments to `hyperfine` for anything that
  is not a Homebrew workload, so `hyperfine` is installed here
  rather than left to the contributor to set up; it is resolved
  before any workload is prepared, as installing it mid-run
  would refill the API metadata a cold workload just removed
- `PhaseTimings.install!` only wrapped already-loaded classes but
  commands load their install path later, so `pour`, `link` and
  `dependency_resolution` silently recorded zero; it now loads
  `cleanup`, `download_queue` and `formula_installer` first,
  timed as an `instrumentation` phase to keep that cost visible
- the measured install drops `--ignore-dependencies`, which
  skipped `compute_dependencies` outright; dependencies are
  installed once up front instead
2026-08-21 15:47:24 +01:00

2.6 KiB

Contributing to Homebrew

First time contributing to Homebrew? Read our Code of Conduct and review How to Open a Homebrew Pull Request.

Discuss, ask questions about or disagree with changes in Homebrew

  • Homebrew/discussions is the place for community discussions around Homebrew.
  • Our issues and pull requests are for maintainers and contributors to discuss work to be done, not users or contributors asking questions about Homebrew usage or disagreeing with changes already made.

Report a bug

  • Run brew update twice.
  • Run and read brew doctor.
  • Read the Troubleshooting checklist.
  • Ideally, open a pull request to fix it, describing both your problem and your proposed solution.
  • If not, open an issue on the formula's repository or on Homebrew/brew if it's not a formula-specific issue, but do not open both an issue and a pull request.

Propose a feature

  • Ideally, open a pull request to implement it, describing both the problem it solves for you and your proposed solution.
  • If not, open an issue with a detailed description of your proposed feature, the motivation for it and alternatives considered.
  • Please note we may close this issue or ask you to create a pull request if this is not something we see as sufficiently high priority.
  • Any pull request claiming performance improvements (e.g. "this is faster") must include brew benchmark results demonstrating the improvement.

"Artificial Intelligence"/Large Language Model (AI/LLM) usage

We allow you to create issues and pull requests with AI/LLM with the following requirements (see Responsible AI Usage for the principles behind them):

  • You must disclose in the initial issue or pull request that you used AI/LLM and what tool/model/etc. you used.
  • You must review all AI/LLM generated code, prose, etc. content before you ask anyone in Homebrew to review it for you.
  • You must not attribute a commit to AI/LLM as an author, co-author, committer or signatory, including through an Assisted-by, Co-developed-by or similar commit trailer.
  • You must answer all maintainer questions and pull request review comments yourself, without using AI/LLM.
  • Unless you are a maintainer, you may only have one AI-assisted/generated pull request open at a time.
  • If you reach the point where you feel unwilling or unable to do the above, please close your issue or pull request.

Thanks!