Skip to content

formulary: link tap issues when formulae print - #24156

Merged
MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
hyuraku:formulary-stdout-tap-issues
Oct 3, 2026
Merged

MikeMcQuaid merged 1 commit into
Homebrew:mainfrom
hyuraku:formulary-stdout-tap-issues

Conversation

@hyuraku

@hyuraku hyuraku commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Formulary.load_formula warns when a formula prints to stdout while loading, but does not say where to report it. This addresses the TODO from #20226.

The warning now includes the tap's issues URL when available, using the appropriate message for official and third-party taps. Otherwise, the warning remains unchanged.

Warning: Formula foo attempted to print the following while being loaded:
Hello from the formula
Please report this issue:
  https://github.com/Homebrew/homebrew-core/issues

I kept this as a warning rather than an error because raising from ensure would prevent otherwise loadable formulae from loading. The suggestion in #20226 also ended with a warning shown to the user.

Added a test for the homebrew/core issues URL.


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Claude Code helped me pick this TODO, wrote the test and drafted this description.
I wrote the fix myself, reviewed the change and ran brew lgtm locally.


Copilot AI lite review requested due to automatic review settings October 3, 2026 10:28

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add coverage and message assertions for the third-party tap branch.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Updates formula-load warnings to include the relevant tap’s issue-reporting URL.

Changes:

  • Adds official and third-party tap guidance to warnings.
  • Adds regression coverage for Homebrew Core.
File Changes
Library/​Homebrew/​test/​formulary_spec.rb Tests the Homebrew Core issue URL.
Library/​Homebrew/​formulary.rb Adds tap-specific issue guidance to load warnings.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/formulary.rb Resolved
@MikeMcQuaid
MikeMcQuaid disabled auto-merge October 3, 2026 13:08
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Oct 3, 2026
Merged via the queue into Homebrew:main with commit 6873e0a Oct 3, 2026
52 checks passed
@hyuraku
hyuraku deleted the formulary-stdout-tap-issues branch October 7, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址