Skip to content

hister 0.12.0 (new formula)#278900

Open
mvanhorn wants to merge 1 commit intoHomebrew:mainfrom
mvanhorn:hister-0.12.0
Open

hister 0.12.0 (new formula)#278900
mvanhorn wants to merge 1 commit intoHomebrew:mainfrom
mvanhorn:hister-0.12.0

Conversation

@mvanhorn
Copy link
Copy Markdown

New formula for hister (v0.12.0). Upstream issue requesting Homebrew distribution: asciimoo/hister#161.

Repo stats: 767 stars, 42 forks, 13 tagged releases (v0.1.0–v0.12.0). License: AGPL-3.0-or-later.

The build runs go generate ./... (which invokes webui/build.sh to produce the Svelte web UI bundle embedded via //go:embed) and then go build. Node is a build-only dep; the runtime is a single static Go binary.

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?
  • Is your test running fine brew test <formula>?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

  • AI was used to generate or assist with generating this PR. The formula was drafted with Claude (Anthropic) and then verified by me locally: brew audit --new --strict --online hister passes clean, brew install --build-from-source hister succeeds (~1 min), brew test hister passes, and hister --version reports v0.12.0. I reviewed the formula against sibling Go+Node formulas (autobrr, anubis) for convention match and read the relevant upstream source (generate.go, webui/build.sh, server/static/static.go) before deciding on the build shape.

@github-actions github-actions Bot added go Go use is a significant feature of the PR or issue nodejs Node or npm use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels Apr 22, 2026
Comment thread Formula/h/hister.rb Outdated

test do
assert_match version.to_s, shell_output("#{bin}/hister --version")
assert_match "search engine", shell_output("#{bin}/hister --help")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do another substantial test other than --help check?

@github-actions github-actions Bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Apr 22, 2026
@mvanhorn
Copy link
Copy Markdown
Author

Good point. Replaced the --help check with a server-spawn test in bf76639:

  • hister create-config writes a default YAML (exercises the config package)
  • hister listen on a free port, then curl the embedded web UI and assert the HTML response

Verified locally: brew test hister returns HTTP 200 from the server, and brew audit --strict --new --online is clean.

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@github-actions github-actions Bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Apr 22, 2026
@mvanhorn
Copy link
Copy Markdown
Author

Fixed in 48d1d5b. Root cause was CGO_ENABLED=0 (the default from std_go_args) producing a stub binary for go-sqlite3, so the server never started and the test's curl got connection refused. Added ENV["CGO_ENABLED"] = "1" to the install block.

Also squashed into a single hister 0.12.0 (new formula) commit so the Commit style check passes (it was failing on the follow-up commit).

Verified locally on darwin/arm64:

  • brew install --build-from-source hister: success
  • brew test hister: server starts, curl -fsS http://127.0.0.1:60692/ returns 200 with an HTML body
  • brew audit --strict --new hister: clean
  • brew style hister: clean

Comment thread Formula/h/hister.rb
system "go", "generate", "./..."
system "go", "build", *std_go_args(ldflags: "-s -w")
end

Copy link
Copy Markdown
Contributor

@GunniBusch GunniBusch Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "tool" seams to be something that user run in the background, correct? So adding a service block https://docs.brew.sh/Formula-Cookbook#service-files might be usefull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Go use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core nodejs Node or npm use is a significant feature of the PR or issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants