docs(install): add scripts/install-dev.sh + Building from source guide#87
Open
christophergeyer wants to merge 1 commit intocg/tracer-check-execfrom
Open
docs(install): add scripts/install-dev.sh + Building from source guide#87christophergeyer wants to merge 1 commit intocg/tracer-check-execfrom
christophergeyer wants to merge 1 commit intocg/tracer-check-execfrom
Conversation
christophergeyer
pushed a commit
that referenced
this pull request
May 9, 2026
The CI workflow's `pull_request: branches: [main]` filter meant only PRs whose base is `main` triggered CI. Stacked PRs (cg/foo → cg/bar) landed blind: PRs #83–#87 in the current ptrace/eBPF/preload stack all reported "no checks reported on the branch" because each one targets a feature-branch base. Drop the branch filter on `pull_request` so CI fires for every PR regardless of base. The `push: branches: [main]` constraint stays — we don't want to burn CI minutes on every feature-branch push, only on PR diffs and main. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A bare `pip install -e .` (or `uv pip install -e .`) only builds the
`artifact-hash-py` pyo3 extension via maturin — the tracer binaries
(`roar-tracer`, `roar-tracer-preload`, `roar-tracer-ebpf`, `roard`,
`roar-proxy`) live in separate cargo crates outside the maturin
manifest and don't get built. The PyPI wheels bundle them under
`roar/bin/`; an editable source install ends up silently missing
them and `roar run` fails with "No tracer binary found" the first
time you try it. The fix wasn't documented anywhere, so every fresh
contributor and demo recipient hit the same head-scratch.
`scripts/install-dev.sh` is the one-shot dev install:
1. `pip install -e ".[dev]"` (preferring `uv` when available)
2. `cargo build --release` for the per-platform tracer set
(Linux: ptrace + preload + ebpf + proxy; macOS: preload + proxy)
3. Stage the built binaries into `roar/bin/` so the editable
install finds them at runtime
4. Smoke-test with `roar tracer status`
Idempotent (cargo is incremental, pip install -e is no-op on rerun)
and degrades gracefully if `bpf-linker` is missing — just skips the
eBPF tracer build with a warning telling you the install command,
the other tracers still work.
README gains a "Building from source" section under Development
that documents both the script and the manual steps it runs (so
the magic isn't opaque), plus the `bpf-linker` + nightly toolchain
prereqs for eBPF on Linux.
Verification:
- bash scripts/install-dev.sh from a clean roar/bin/ produces all
five binaries + the preload .so on this aarch64 box
- shellcheck install-dev.sh: clean
- existing pytest unit suite: 1387 passed, 3 skipped (no Python
code changed; sanity check only)
- ruff check + format: clean
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b177593 to
feefb7e
Compare
5cbb73c to
00d7b28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pip install -e ./uv pip install -e .only builds theartifact-hash-pypyo3 extension — the tracer binaries (roar-tracer*,roard,roar-proxy) live in separate cargo crates outside the maturin manifest and don't get built. The PyPI wheel bundles them underroar/bin/; an editable source install ends up silently missing them androar runfails with "No tracer binary found" the first time you try it.This was nowhere in the README. The only way to discover it was install → run → preflight fail →
roar tracer status→ infer the missing binaries → find the cargo build commands somewhere.Fix
scripts/install-dev.sh— one-shot dev install:pip install -e ".[dev]"(preferringuvwhen available)cargo build --releasefor the per-platform tracer set:roar-tracer+roar-tracer-preload+roar-tracer-ebpf+roar-proxyroar-tracer-preload+roar-proxyroar/bin/so the editable install finds them at runtimeroar tracer statusIdempotent (
cargo buildis incremental,pip install -eno-ops on rerun) and degrades gracefully whenbpf-linkeris missing — just skips the eBPF build with a warning that names the install commands. The other tracers still work.README — new "Building from source" section under Development that documents both the script and the manual steps it runs (so the magic isn't opaque), plus the
bpf-linker+ Rust nightly toolchain prereqs for eBPF on Linux. The existing "Development Installation" block points at the script first.After-fix output
Test plan
bash scripts/install-dev.shfrom a cleanroar/bin/; all 5 binaries + preload .so produced (Linux aarch64)shellcheck scripts/install-dev.sh: cleanruff check ./ruff format --check: cleanStacks on #86.
🤖 Generated with Claude Code