Skip to content

Migrate thv from formula to cask - #9

Merged
rdimitrov merged 1 commit into
mainfrom
migrate-thv-to-cask
Oct 19, 2026
Merged

rdimitrov merged 1 commit into
mainfrom
migrate-thv-to-cask

Conversation

@rdimitrov

@rdimitrov rdimitrov commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Important

Ready to merge. v0.55.1 published Casks/thv.rb (fd34bdf), and this branch is rebased on top of it.

Summary

toolhive moved from GoReleaser's deprecated brews (formula) pipe to homebrew_casks in stacklok/toolhive#6859. From the next release on, thv is published as Casks/thv.rb, and Formula/thv.rb stops getting updates.

  • Delete Formula/thv.rb.
  • Add tap_migrations.json with {"thv": "stacklok/tap"}. When brew update sees the formula deleted, Homebrew looks up this entry and treats it as a formula-to-cask migration within the same tap (see migrate_tap_migration in Homebrew's cmd/update_report/reporter.rb).
  • Point the README's thv row at Casks/thv.rb.

mecatl and modelith aren't affected. Their formulas and README row are untouched, and Homebrew only reads tap_migrations.json for the names of deleted package files.

User-facing change

  • Before: thv is installed as a formula.
  • After: on the next brew update, Homebrew prints "stacklok/tap/thv has been migrated from a formula to a cask". If the user trusts the tap, it unlinks the formula and runs brew install --cask stacklok/tap/thv automatically. If they only trusted the thv formula, brew prints brew trust --cask stacklok/tap/thv and an install command for them to run.

New installs still use brew install stacklok/tap/thv.

Post-release checklist

  • Casks/thv.rb exists on main (written by the toolhive release)
  • Rebased onto main
  • Before merging, on a Mac that has the thv formula installed: brew list --formula thv shows a version
  • After merging: brew update prints "stacklok/tap/thv has been migrated from a formula to a cask"
  • brew list --cask thv succeeds, and thv version runs without a Gatekeeper prompt
  • Clean up the old keg with brew uninstall --formula --force thv (brew prints this command)

Note: Homebrew only runs the migration for changes that brew update itself pulls from main. Checking out this branch in the local tap won't run it, so the migration can only be tested after the merge.

🤖 Generated with Claude Code

toolhive now publishes thv as a Homebrew cask (stacklok/toolhive#6859),
so the formula no longer gets updates. Remove it and add a tap
migration so existing installs move to the cask on brew update.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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