Skip to content

Build Tempyr before installing#43

Merged
cleak merged 1 commit into
masterfrom
codex/install-build-first
May 2, 2026
Merged

Build Tempyr before installing#43
cleak merged 1 commit into
masterfrom
codex/install-build-first

Conversation

@cleak
Copy link
Copy Markdown
Owner

@cleak cleak commented May 2, 2026

Summary

  • Run cargo build --release before installer lock handling so compile failures do not stop the currently installed Tempyr binary.
  • Share Windows Cargo invocation plumbing between build and install paths.
  • Update install docs to describe the build-first flow.

Testing

  • cargo build --release --manifest-path crates/tempyr-cli/Cargo.toml --locked --bin tempyr
  • powershell parse check for install.ps1
  • bash -n install.sh via Git Bash
  • .\install.ps1 -InstallRoot <temp> -NoPathUpdate smoke test
  • git diff --check
  • cargo test --workspace --exclude tempyr-journal --locked

Note: cargo test --workspace --locked currently hangs on Windows in tempyr-journal at git::tests::timeout_kills_long_running_child; this appears unrelated to the installer changes.

Summary by CodeRabbit

  • Documentation

    • Updated Linux and Windows installation instructions with explicit pre-build step documentation.
  • Chores

    • Enhanced installers to compile the binary before installation and improve handling when the existing binary is already running.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a9250153-8982-4d65-822d-618d483806ad

📥 Commits

Reviewing files that changed from the base of the PR and between 6dd93b5 and b90f33e.

📒 Files selected for processing (3)
  • docs/install.md
  • install.ps1
  • install.sh

📝 Walkthrough

Walkthrough

The PR adds an explicit cargo build --release step before installation across Linux and Windows installers. New helper functions are introduced in both scripts to encapsulate cargo execution, the build is invoked before the existing lock-checking and install flow, and documentation is updated to reflect this behavior.

Changes

Pre-Install Cargo Build

Layer / File(s) Summary
Helper Functions & Utilities
install.ps1
Invoke-CargoCommand centralizes Cargo process execution with argument escaping, stdout/stderr capture, and returns exit code and output. Invoke-CargoBuild wraps cargo build --release with the locked manifest path and throws a formatted error on build failure.
Helper Functions & Utilities
install.sh
run_cargo_build() executes cargo build --release with locked manifest path and binary target.
Integration & Invocation
install.ps1, install.sh
Both scripts call their respective build helpers before lock recovery and install flow, ensuring compilation succeeds before checking target binary in-use status.
Documentation
docs/install.md
Linux and Windows sections now document the explicit pre-build step. "Updating safely" section clarifies that both installers build before checking for in-use binary, retry on transient locks, and stop only exact-path-matching processes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Add cross-platform installer scripts #5: Added the foundational cross-platform installer logic (install.ps1 and install.sh); this PR builds on that foundation by introducing cargo build helpers and refactoring cargo invocation within those same scripts.
  • Fix Windows installer cargo stderr handling #6: Modified PowerShell installer with Start-Process and ConvertTo-WindowsArgument patterns; this PR extends that approach with Invoke-CargoCommand and introduces Invoke-CargoBuild that runs build-before-install.
  • Harden Windows installer lock recovery #7: Related installer flow changes; this PR introduces the pre-build step helpers that complement the lock-recovery install flow from that PR.

Poem

🐰 A build before the lock, they say,
Will save the install from dismay—
Cross-platform helpers stand so tall,
Escaping arguments and catching all,
Release binaries, locked and true,
New and tidy through and through.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Build Tempyr before installing' directly and clearly summarizes the main change: adding a cargo build step before the installer runs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Review rate limit: 1/5 review remaining, refill in 41 minutes and 10 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@cleak cleak merged commit 46f937a into master May 2, 2026
5 checks passed
@cleak cleak deleted the codex/install-build-first branch May 2, 2026 05:08
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