29211, "arifthpe", "Unify 'chapel-main' and 'chapel-release' versions of Homebrew formula", "2026-08-03T23:01:26Z"
Currently under chapel/util/packaging/homebrew at main · chapel-lang/chapel · GitHub we have two versions of the Chapel Homebrew formula, chapel-main.rb and chapel-release.rb. chapel-main.rb is where we make any updates we want between releases, and chapel-release.rb reflects the upstream formula in homebrew-core. The two are reconciled as part of our release process (PR'ing any changes we've made on chapel-main in the meantime up to homebrew-core), but otherwise can diverge.
Our workflow chapel/.github/workflows/monitor-homebrew.yml at main · chapel-lang/chapel · GitHub opens PRs to mimic any updates made to the live formula to chapel-release.rb. The test-homebrew job (added in Add Linux and macOS test-homebrew GA job by arifthpe · Pull Request #29133 · chapel-lang/chapel · GitHub, previously tested nightly) tests only chapel-main.rb. chapel-main contains some adjustments (such as replacing the bottle block with a placeholder which testing will fill in) for tricking brew test-bot into testing our formula from source and not using the published Homebrew binaries.
Having both of these adds some additional burden in propagating changes between the two, as well as potentially diverging enough to cause issues when upstream changes (in chapel-release only) and our changes (in chapel-main only) are integrated. To improve things, we ought to unify them into one chapel.rb, which will fulfill both roles; any changes from upstream will be integrated into it, but we also can make changes directly to it (which may not be reflected up to homebrew-core until release time). We'll still need some of the particularities for local testing, which I think should be kept in a patch that test scripts apply.