Files
kandev/Formula
José Almeida d02441201f fix(homebrew): mirror upstream PR formula fixes (#972)
* fix(homebrew): mirror upstream PR fixes

Keep the in-repo reference formula in sync with what's actually
being submitted at Homebrew/homebrew-core#283241:

- Bump url + sha256 to v0.50.0 (the version the upstream PR pins)
- Strip *musl* paths from the web bundle before libexec.install
  (brew linkage --test flags musl-linked variants of sharp on
  glibc-only Linuxbrew)
- Set KANDEV_AGENT_STANDALONE_PORT to a free port in the test block
  so agentctl doesn't collide on the default 39429

* fix(homebrew): switch test poll to quiet_system + agentctl-only

Mirror fixes from upstream Homebrew/homebrew-core#283241:
- Switch the functional test to spawn libexec/bin/agentctl (pure-Go,
  no cgo+sqlite) instead of the full backend, sidestepping a Linux
  arm64 agentctl-launcher crash unique to brew test sandbox
- Use quiet_system instead of system for the curl poll. Formula#system
  raises BuildError on the first non-zero exit, which killed the
  retry loop before agentctl had time to bind the port

* fix(homebrew): swap functional test to agentctl CLI dispatch

Mirror upstream Homebrew/homebrew-core#283241 — Linux arm64 bottle CI
keeps timing out spawning agentctl as an HTTP server. The 'agentctl
kandev' subcommand exercises the same binary's boot + flag parser
+ CLI dispatcher path without binding any ports, which fits within
the sandbox constraints of brew test.

* fix(homebrew): build agentctl static (CGO_ENABLED=0)

Mirror upstream Homebrew/homebrew-core#283241 — agentctl was
segfaulting on Linuxbrew arm64 bottle CI. agentctl is pure-Go
(no cgo deps), so building it without cgo gives a static binary
that avoids whatever dynamic-linker issue is biting on that
platform. kandev still needs cgo for mattn/go-sqlite3.

* fix(homebrew): tighten musl-prune style + assertion

Mirror upstream Homebrew/homebrew-core#283241:
- Use bundle.glob(...) instead of Pathname.glob with string interp
- Drop the if p.directory? guard so bare musl .node files (if a
  future bundler version emits them) also get stripped — rm_r
  handles both shapes
- Spell out sharp / @swc/core / lightningcss in the comment
- Tighten the agentctl smoke check to an exact-string match

* fix(homebrew): guard musl prune against ENOENT race

bundle.glob returns parent dirs alongside the musl-named .node
files inside them. rm_r on the parent makes the child path vanish
before iteration reaches it, blowing up with Errno::ENOENT. Skip
paths that no longer exist.
2026-05-21 11:29:30 +01:00
..