Skip to content

build: keep the checkout build off PATH - #83

Merged
vishr merged 2 commits into
mainfrom
build/keep-the-checkout-build-out-of-path
Aug 20, 2026
Merged

build: keep the checkout build off PATH#83
vishr merged 2 commits into
mainfrom
build/keep-the-checkout-build-out-of-path

Conversation

@vishr

@vishr vishr commented Aug 20, 2026

Copy link
Copy Markdown
Member

just build wrote straight into ~/.local/bin, so compiling put the working tree in front of whatever ob the machine had installed. Typing ob meant the checkout, and ob doctor reported it on every run:

PATH selects a different ob executable than the running binary; 1 stale PATH candidate(s) found

A warning that was correct, permanent, and easy to stop reading. The difference only surfaces when someone is already confused about which binary produced a result — the worst moment to discover it.

Change

Shipping a binary onto PATH is a decision, not a side effect of compiling.

  • just build./bin/ob (already gitignored, already where the docs generator reads it from)
  • just install → the deliberate step that copies it to ~/.local/bin, printing where it landed and what it answers to
  • just clean → removes both
  • OB_BIN_DIR moves the build, OB_INSTALL_DIR moves the install

README and CONTRIBUTING corrected to match.

Verified locally

just build     → built bin/ob;    `ob` still resolves to Homebrew's v2026.8.4
just install   → installed /Users/v/.local/bin/ob (v2026.8.4-6-gc5d511d)
just clean     → both gone;       `ob` back to Homebrew's v2026.8.4
just ci        → passed

🤖 Generated with Claude Code

vishr and others added 2 commits August 20, 2026 14:55
`just build` wrote straight into ~/.local/bin, so compiling put the working
tree in front of whatever ob the machine had installed. Typing `ob` then
meant the checkout, and `ob doctor` reported it on every run as "PATH
selects a different ob executable than the running binary; 1 stale PATH
candidate(s) found" — a warning that was correct, permanent, and easy to
stop reading. The difference only surfaces when someone is already confused
about which binary produced a result, which is the worst moment to discover
it.

Shipping a binary onto PATH is a decision rather than a side effect of
compiling, so the build lands in ./bin — already gitignored, already where
the docs generator reads it from — and `just install` is the step that puts
it on PATH, saying where it landed and what it answers to. `just clean`
removes both. OB_BIN_DIR moves the build, OB_INSTALL_DIR the install.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The first version of this change left `clean` removing
~/.local/bin/ob as well as the build. That was right while `build` wrote
there — it removed what the recipe had put there — and wrong the moment the
build moved to ./bin: `just clean` in a checkout would delete a binary this
checkout may never have created, including a release installed by hand
through the steps the installation guide gives.

`clean` now removes the build. `uninstall` removes the copy on PATH, and
says which path it removed.

Verified: with a binary installed, `just clean` removes ./bin/ob and leaves
~/.local/bin/ob standing; `just uninstall` then removes it and `ob` falls
back to the Homebrew release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vishr
vishr merged commit 75a5db3 into main Aug 20, 2026
5 checks passed
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