feat(dev-install): build and install PATH shims alongside the main binary - #301
Conversation
…nary dev-install only ever built and swapped the main `agentflare` binary, so the hardlink-based PATH shim installer (`agentflare init`'s "shims" component) had nothing to link -- it only looks for `agentflare-shim`/ the git shim next to the currently running executable, and no install path (cargo install, dev-install) ever placed them there. dev-install now also builds `agentflare-shim` and flare-git-shim's `git` binary, copies them next to the freshly installed `agentflare`, and runs the same hardlink install `init` does -- best-effort only, so a shim build failure never blocks the main binary install. Agentflare-Agent: claude-code_2-1-216_agent Agentflare-Branch: dev-install-shim-bundling
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…stall() consumes it install_shims stages a copy named 'git'/'git.exe' next to the main agentflare binary so shim_install::install() can find and hardlink it into the real, dedicated shims dir. bin_dir (target.parent()) is often a general-purpose PATH dir shared with unrelated tools -- for a cargo-install setup that's ~/.cargo/bin -- so a leftover file literally named 'git' left sitting there would silently shadow the real git for anything else resolving it via that PATH entry. Clean it up once install() has consumed it; dev-install rebuilds it fresh every run so there's nothing lost. Agentflare-Agent: claude-code_2-1-216_agent Agentflare-Branch: dev-install-shim-bundling
…ndling Agentflare-Agent: claude-code_2-1-216_agent Agentflare-Branch: dev-install-shim-bundling
Summary
Found while investigating why
agentflare init --agent claude-codewasn't hardlinking~/.agentflare/shims/'s 56 stale duplicate-byte shim files into hardlinks (item #133/#227's fix) on a dev machine:agentflare init's "shims" component only links pre-builtagentflare-shim/flare-git-shimbinaries it finds next to the currently-runningagentflareexecutable — but no install path (cargo install, and especiallydev-install, the primary local dev-loop command) ever built and placed those sibling binaries there. Only a packaged release archive would.dev_install::cargo::build_shimsbuildsagentflare-shimandflare-git-shim'sgit-named bin in one cargo invocation, generalizing the existing single-target JSON-artifact parser to look up by name.dev_install::install_shimscopies both next to the freshly installedagentflare, then runsshim_install::install()(the same hardlink logicinit's "shims" component uses).dev-installoverall, since the main binary is already installed by that point (matchesshim_install's existing "nice-to-have" philosophy).Verified manually: ran the exact
cargo build -p agentflare-shim --bin agentflare-shim -p flare-git-shim --bin gitinvocation directly — producesagentflare-shim.exeandgit.exewith the exact target namesbuild_shims/parse_named_executable_pathexpect.Test plan
cargo build --workspace --all-featurescleancargo test --workspace— 727 passed, 0 failedcargo fmt --all -- --checkcleanbuild_shimscargo invocation produces the expectedagentflare-shim.exe/git.exeartifacts