Skip to content

fix(homebrew): hoist url/sha256 so the formula loads on every platform - #323

Open
stuffbucket wants to merge 1 commit into
mainfrom
fix/formula-loads-on-all-platforms
Open

stuffbucket wants to merge 1 commit into
mainfrom
fix/formula-loads-on-all-platforms

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

Formula template counterpart to stuffbucket/homebrew-tap#3.

brew tap validates a tap against every platform it supports, including arm64_linux. url/sha256 lived inside on_macos do → on_arm do, so on Linux those blocks did not apply and the rendered formula had no URL:

Invalid formula (arm64_linux): bladerunner: formula requires at least a URL

A tap is all-or-nothing, so this stopped the entire stuffbucket/tap from loading — coop, vale and the claudeme cask were unusable because of it.

depends_on :macos / depends_on arch: :arm64 do not prevent this: loading happens before dependencies are evaluated. They are also already what restricts installation to arm64 macOS, so the platform blocks were redundant as well as harmful.

Verification

Rendered through release-please.yml's sed with real release values, then validated with brew readall (the same check brew tap performs): 2 errors before, clean after, on linux/arm, linux/intel and --os=all. brew info still resolves 0.4.8 on macOS.

release-please.yml's sed is pure PLACEHOLDER_* substitution, so it is unaffected by the indentation change.

The tap repo's rendered copies were patched directly in stuffbucket/homebrew-tap#3 so the tap works without waiting for a release; this change keeps the next release from reverting it.

🤖 Generated with Claude Code

`brew tap` validates a tap against every platform it supports, including
arm64_linux. url/sha256 lived inside `on_macos do -> on_arm do`, so on Linux
those blocks did not apply and the formula had no URL:

    Invalid formula (arm64_linux): bladerunner: formula requires at least a URL

A tap is all-or-nothing, so this stopped the ENTIRE stuffbucket/tap from
loading -- coop, vale and the claudeme cask were unusable because of it.

`depends_on :macos` / `depends_on arch: :arm64` do not prevent this: loading
happens before dependencies are evaluated. They are also already what restricts
installation to arm64 macOS, so the platform blocks were redundant as well as
harmful.

Verified with `brew readall --os=linux --arch=arm stuffbucket/tap`: two errors
before, clean after, with `brew info` still resolving 0.4.8 on macOS.

The release-please.yml renderer is pure PLACEHOLDER_* substitution, so it is
unaffected by the indentation change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant