Skip to content

info: fix formula and cask regressions - #24579

Merged
HaraldNordgren merged 5 commits into
mainfrom
cask-formula-info
Nov 12, 2026
Merged

HaraldNordgren merged 5 commits into
mainfrom
cask-formula-info

Conversation

@HaraldNordgren

@HaraldNordgren HaraldNordgren commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #24573. These fixes were prepared in response to review feedback but were not pushed before that PR was merged.

  • Restore the missing Caskroom path warning in normal output when an installation receipt exists but the staged version directory is missing. Receipt details remain verbose-only.
  • Preserve the platform-specific requirement check so uninstalled formulae that need to build from source show their build dependencies when their OS requirement matches the current platform.
  • Reuse the installed-cask list across info summaries instead of loading every installed cask for each summary, and avoid duplicate rows when the same cask token exists in different taps.
  • Strengthen full-output regression tests for formula and cask information.

For example, the missing-path test simulates an installed cask with a receipt for version 1.0 but no staged directory. brew info example now includes the warning without --verbose:

==> example: 1.0
Installed (as dependency)
==> Installed Versions
example 1.0
  /usr/local/Caskroom/example/1.0 (does not exist)

  • 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; every commit has a human author or co-author and I will answer maintainer questions and review comments myself without AI/LLM.

GitHub Copilot using GPT-6 Luna and GPT-6.1 Terra implemented and tested the changes.


Restore missing cask path warnings and preserve platform-specific
build dependencies. Reuse installed casks across summaries and
strengthen full-output tests.
@HaraldNordgren HaraldNordgren changed the title Fix info output regressions info: improve cask output Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Missing installed cask paths are shown as warnings, including when verbose details are not enabled.
    • Installed casks with matching tokens from different taps are listed only once.
    • Cask information finds related installed versions, including renamed casks, without including unrelated installed casks.
    • OS-specific requirements are identified according to the selected or simulated operating system.
    • Cask information displays installed-version details more consistently, including warnings and not-installed status.
    • Verbose installed-cask summaries show matching casks and versions in newest-first order.

Cask info now loads related installed casks by token and reports missing staged paths as warnings. Requirement checks identify requirements for the other operating system based on the active or simulated system. The OS-specific info command extensions were removed.

Changes: Info output and installed cask reporting

Layer / File(s) Summary
Installed cask selection
Library/Homebrew/cask/caskroom.rb, Library/Homebrew/cask/info.rb, Library/Homebrew/test/cask/caskroom_spec.rb, Library/Homebrew/test/cask/info_spec.rb, Library/Homebrew/test/cmd/info_spec.rb
Caskroom.casks accepts optional token filtering. Cask info resolves related installed tokens, including versioned and renamed tokens, and loads only those casks. Specs cover token filtering, rename resolution, and installed-cask output.
Missing-path warnings in cask output
Library/Homebrew/cask/info.rb, Library/Homebrew/utils/info_display.rb, Library/Homebrew/test/cask/info_spec.rb, docs/Querying-Brew.md
Cask info supplies missing staged paths as warnings. The display shows warnings even when verbose details are disabled. Specs check missing-path and grouped-artifact output; the documentation uses “installation artefacts”.
OS-specific requirement checks and info output
Library/Homebrew/utils/info_display.rb, Library/Homebrew/cmd/info.rb, Library/Homebrew/extend/os/*/cmd/info.rb, Library/Homebrew/test/utils/info_display_spec.rb, Library/Homebrew/test/cmd/info_spec.rb
Requirement checks identify macOS or Linux requirements for another OS, using the active or simulated system. The OS-specific command extensions were removed. Specs cover requirement checks and formula info output.
Merge Risk: Minimal · previous review 68538

The change fixes the missing-path warning and the requirement checks in brew info output and adds regression tests. No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "info: fix formula and cask regressions" matches the main purpose of the changeset. The changes restore a Caskroom path warning for cask info, restore the platform-specific requirement check…
Description check Passed The description states the four fixes: the Caskroom path warning, the platform-specific requirement check, the reuse of the installed-cask list with duplicate-row avoidance, and stronger regression te…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "info: fix formula and cask regressions" matches the main purpose of the changeset. The changes restore a Caskroom path warning for cask info, restore the platform-specific requirement check for formula build dependencies, and strengthen info output tests. The title names both the formula and cask parts, though it does not name the specific fixes. It is concise and specific enough for a reviewer scanning history.

Full details: Description check

Explanation

The description states the four fixes: the Caskroom path warning, the platform-specific requirement check, the reuse of the installed-cask list with duplicate-row avoidance, and stronger regression tests. It gives a reproduction example for the missing-path warning and links the follow-up to the merged PR. The changeset matches these claims, so the description relates directly to the changes.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 861f1dd5-8e4e-468f-9124-83c7e4523996
Commits

Reviewing files that changed from the base of the PR and between b2e066c and 68538ea.

Files selected for processing: 1

  • Library/Homebrew/test/cmd/info_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@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.

Thanks, few tweaks and CI failing.

Comment thread docs/Querying-Brew.md Resolved
Comment thread Library/Homebrew/cask/info.rb Resolved
Comment thread Library/Homebrew/cmd/info.rb Resolved
Comment thread Library/Homebrew/utils/info_display.rb Resolved
@HaraldNordgren HaraldNordgren changed the title info: improve cask output info: fix formula and cask regressions Nov 12, 2026

@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.

Tiny nit otherwise good.

Comment thread docs/Querying-Brew.md Resolved
@HaraldNordgren
HaraldNordgren added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit c8145f6 Nov 12, 2026
55 checks passed
@HaraldNordgren
HaraldNordgren deleted the cask-formula-info branch November 12, 2026 13:06
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.

2 participants