Skip to content

fix(homebrew): pick the install layout from the archive for 2.x (#652) - #1456

Merged
godofecht merged 1 commit into
mainfrom
fix/652-formula-2.0-layout
Oct 8, 2026
Merged

godofecht merged 1 commit into
mainfrom
fix/652-formula-2.0-layout

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

Part of #652, retargeted to the v2.0.0 release (decision recorded in #1455).

Problem

The stable branch of packaging/homebrew/Formula/flow.rb installed the Python src/ tree whenever the build was not HEAD. A 2.x release archive has VERSION and tools/ and no src/, so the formula would fail on the first 2.x archive.

Change

  • The formula picks its layout from the archive: VERSION present (2.x, HEAD) installs the self-hosted CLI and runs flow version to build it; otherwise (v1.0.1) installs src/. The url, sha256 and license still name the published v1.0.1 archive.
  • packaging/homebrew/README.md: the first 2.x formula update also sets license :cannot_represent, since LICENSE is proprietary from 2.0.0.

Proof (macOS 26 arm64, Homebrew 7.0.8, throwaway local tap, removed afterwards)

Baseline: the old formula's non-HEAD path runs libexec.install "src", which a git archive of main does not contain.

With this formula:

  • brew style: no offenses. brew audit --strict --online: exit 0.
  • Published v1.0.1 archive (url and sha256 unchanged): brew install --build-from-source exit 0, brew test exit 0, flow version prints Flow 1.0.1.
  • A 2.0.0 archive built with git archive --prefix=flow-2.0.0/ from main 55dc81b7 (sha256 b12410dd...28c9), url pointed at it with version "2.0.0": install exit 0, brew test exit 0, flow version prints Flow 2.0.0, and flow run hello.flow builds and prints its line, exit 0.

No tag, release or tap push is made here. After merge the tap formula is synced byte for byte.

Risk: the v1.0.1 install is unchanged in behaviour (shown above).

The stable path installed the Python src/ tree whenever the build was not
HEAD, so a 2.x release archive, which has VERSION and tools/ and no src/,
would fail to install once the formula points at it. The formula now
uses the self-hosted layout when the archive has a VERSION file. The
README notes the license change the first 2.x formula update needs.
@godofecht
godofecht enabled auto-merge October 8, 2026 00:17
@godofecht
godofecht added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 44031dc Oct 8, 2026
26 checks passed
@godofecht
godofecht deleted the fix/652-formula-2.0-layout branch October 12, 2026 23:03
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