Use cask dependencies for platform support - #23496
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts cask platform support handling so depends_on (OS/arch) declarations are treated as the source of truth for supported platforms, while sha256 only selects an appropriate checksum. It also updates bump-cask-pr to avoid attempting downloads for unsupported platforms and to fail fast when a checksum is missing.
Changes:
- Teach
bump-cask-prto skip OSes not supported by the cask’s OSdepends_on, and to raise early when the computed checksum is missing. - Simplify the cask
sha256DSL to stop raising when the selected checksum isnil. - Update/add specs to enforce the new expectations (missing checksums require explicit
depends_onconstraints).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Library/Homebrew/dev-cmd/bump-cask-pr.rb | Skips unsupported OS simulations via supports_macos?/supports_linux? and raises a targeted error when sha256 resolves to nil. |
| Library/Homebrew/cask/dsl.rb | Removes real-system raising behavior for nil checksum selection, leaving sha256 as a selector only. |
| Library/Homebrew/test/dev-cmd/bump-cask-pr_spec.rb | Updates fixtures to include OS depends_on and adds a regression spec ensuring missing checksums are rejected before download. |
| Library/Homebrew/test/cask/dsl_spec.rb | Updates checksum behavior expectations and asserts arch constraints can be used to declare unsupported architectures. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Keep `sha256` responsible only for selecting a checksum. - Use OS and architecture `depends_on` declarations as the source of truth for supported platforms. - Reject missing platform checksums before any download and make `--require-sha` reject both `nil` and `:no_check`. Fixes #23494
MikeMcQuaid
force-pushed
the
depends-on-single-casks
branch
from
August 11, 2026 12:04
440148f to
b3f0e09
Compare
p-linnane
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sha256responsible only for selecting a checksum.depends_ondeclarations as the source of truth for supported platforms.bump-cask-prattempts a download.Fixes #23494
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 Sol xhigh with local review and testing.