Skip to content

fix(run): discover bundled cross-target runtime libraries - #10224

Closed
proggeramlug wants to merge 2 commits into
mainfrom
codex/10209-local-runtime-discovery
Closed

proggeramlug wants to merge 2 commits into
mainfrom
codex/10209-local-runtime-discovery

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

perry run --local now discovers cross-compiled runtime archives in prebuilt installations using the same library search as compilation. A bundled Android runtime next to the executable is accepted even when the project has no target/ directory.

Changes

  • Replace the run command's two hardcoded source-build paths with the compiler's library lookup.
  • Cover executable-relative Android/Wear OS bundles, compressed archives, environment overrides, Apple-suffixed libraries, missing libraries, and architecture separation using an isolated subprocess test.
  • Add a changelog fragment; no version bump.

Related issue

Fixes #10209.

Test plan

  • The new regression fails on the original implementation: the linker finds the bundled archive while can_compile_locally returns false.
  • cargo test -p perry --bin perry commands::run::entry::tests --no-default-features --features dev-cli -j 3: 4 passed after the fix (unoptimized profile, debug information disabled).
  • python3 scripts/check_node_version_consistency.py: passed.
  • bash scripts/pre-tag-check.sh --quick: all checks passed except public benchmark evidence freshness. The checker, recorded artifact, and all fingerprint inputs are unchanged from base bb9aa5a641; the existing artifact reports that benchmark inputs changed.
  • rustfmt --edition 2021 --check crates/perry/src/commands/run/entry.rs and git diff --check: passed.

The tests validate library discovery without an Android SDK or connected device; an Android application launch was not exercised.

CI status

Current CI failures are in unchanged base inputs: public benchmark evidence freshness (lint), unused registered_extern_handle and wasm_memory_descriptor_maximum functions (warnings), and an unregistered raw thread-local declaration in regex/perex_owner.rs (self-test-checkers). This PR changes only local runtime discovery and its tests.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 4dd6dceb-ce40-4e2a-abc2-3ec71c9c2edc

📥 Commits

Reviewing files that changed from the base of the PR and between bb9aa5a and d674d87.

📒 Files selected for processing (2)
  • changelog.d/10224-local-runtime-discovery.md
  • crates/perry/src/commands/run/entry.rs

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

can_compile_locally now uses shared compiler library discovery for cross-compiled targets. Tests cover installed runtime layouts, archives, architecture-specific paths, environment overrides, and Apple suffixes. The changelog documents the expanded discovery behavior.

Changes

Local runtime discovery

Layer / File(s) Summary
Shared runtime lookup integration
crates/perry/src/commands/run/entry.rs
can_compile_locally delegates cross-target runtime detection to compile::find_library. Host builds remain available without cross-runtime lookup.
Runtime lookup validation
crates/perry/src/commands/run/entry.rs, changelog.d/10224-local-runtime-discovery.md
Tests validate bundled and compressed archives, architecture-specific directories, environment overrides, and target-suffixed Apple bundles. The changelog records the expanded discovery support.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to d674d

Prebuilt cross-compiled installations can now locate bundled runtime archives for local runs without requiring a source-tree target directory.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #10209 requires perry run --local to find cross-compiled runtime libraries in prebuilt installations, including the executable-relative target directory. can_compile_locally now calls `compi…
Out of Scope Changes check ✅ Passed The changes stay within issue #10209. The implementation fixes runtime discovery, the subprocess tests verify the discovery layouts, and the changelog documents the fix. No unrelated product behavior …
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 …
Description check ✅ Passed The description includes the required Summary, Changes, Related issue, Test plan, and CI status information. It documents the implementation, regression coverage, commands run, and known limitations. …
Title check ✅ Passed The title clearly and concisely describes the main change: runtime discovery for bundled cross-target libraries during local runs.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/10209-local-runtime-discovery

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.

❤️ Share

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

@proggeramlug

Copy link
Copy Markdown
Contributor Author

Landed via merge train 185r (#10242) at 9fda98d on main.

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.

perry run --local rejects prebuilt installs: can_compile_locally ignores the exe-relative lib dir that find_library uses

1 participant