Skip to content

fix(cua-driver-rs)(scripts): point Rust dev installers at libs/cua-driver/rust/ - #1676

Merged
f-trycua merged 1 commit into
mainfrom
fix-install-local-rust-source-path
May 24, 2026
Merged

fix(cua-driver-rs)(scripts): point Rust dev installers at libs/cua-driver/rust/#1676
f-trycua merged 1 commit into
mainfrom
fix-install-local-rust-source-path

Conversation

@f-trycua

@f-trycua f-trycua commented May 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1674. The Rust dev installers moved up from `libs/cua-driver/rust/scripts/` to `libs/cua-driver/scripts/` in that PR, but their internal source-dir resolution wasn't adjusted. Running `.\install-local.ps1` against a fresh checkout failed with:

```
error: could not find `Cargo.toml` in `C:\Users\cuademo\cua\libs\cua-driver` or any parent directory
```

$ScriptDir/.. used to resolve to the Cargo workspace at `libs/cua-driver/rust/`. After the move it lands at `libs/cua-driver/` (no Cargo.toml).

Fix

File What
`install-local.ps1` `$RepoRoot = $ScriptDir..\rust` (was just `..`)
`install-local.ps1` `$HintsTxt = $ScriptDir\post-install-hints.txt` (was via the now-broken `$RepoRoot..\cua-driver\scripts\` indirection)
`_install-local-rust.sh` `REPO_ROOT = $SCRIPT_DIR/../rust`
`_install-local-rust.sh` `SOURCE_SKILLS = $REPO_ROOT/Skills/cua-driver-rs`
`_install-local-rust.sh` `HINTS_TXT = $SCRIPT_DIR/post-install-hints.txt`

The Swift dev installer (`_install-local-swift.sh`) was already pointed at `swift/` in #1674 — only the Rust side needed this follow-up.

Test plan

  • `bash -n _install-local-rust.sh` clean
  • Verified `libs/cua-driver/rust/Cargo.toml` and `libs/cua-driver/rust/Skills/cua-driver-rs/` exist at the new $REPO_ROOT
  • Reviewer: run `./scripts/install-local.ps1` from a fresh checkout on Windows — should build + install (the failing path that prompted this PR)
  • Reviewer: run `./scripts/install-local.sh` on Linux — should auto-select Rust backend, build, install
  • Reviewer: run `./scripts/install-local.sh` on macOS — should default to Swift backend (Swift side unchanged)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated installation script path configurations for improved workspace root resolution and build artifact handling during local installations.

Review Change Stack

…iver/rust/

Follow-up to #1674. The Rust dev installers (install-local.ps1 +
_install-local-rust.sh) moved up from libs/cua-driver/rust/scripts/
to libs/cua-driver/scripts/ in that PR, but their internal source-dir
resolution wasn't adjusted — \$ScriptDir/.. now lands at
libs/cua-driver/ (no Cargo.toml) instead of the Cargo workspace at
libs/cua-driver/rust/. Running install-local.ps1 against a fresh
checkout failed with `could not find Cargo.toml`.

Fixes:
- install-local.ps1:
  - \$RepoRoot now resolves to \$ScriptDir/../rust
  - \$HintsTxt now points at \$ScriptDir/post-install-hints.txt directly
    (used to go through \$RepoRoot/../cua-driver/scripts/ — both that
    indirection and the cwd it relied on are gone)
- _install-local-rust.sh:
  - REPO_ROOT now resolves to \$SCRIPT_DIR/../rust
  - SOURCE_SKILLS reads from \$REPO_ROOT/Skills/cua-driver-rs (the
    Cargo workspace tree) instead of \$SCRIPT_DIR/../Skills which is
    now the canonical scripts/ parent
  - HINTS_TXT now resolves to \$SCRIPT_DIR/post-install-hints.txt
@vercel

vercel Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored May 24, 2026 11:14am

Request Review

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af804b87-b928-4e4d-8f6e-2dd872e3862f

📥 Commits

Reviewing files that changed from the base of the PR and between 53e6736 and 0a4ad31.

📒 Files selected for processing (2)
  • libs/cua-driver/scripts/_install-local-rust.sh
  • libs/cua-driver/scripts/install-local.ps1

📝 Walkthrough

Walkthrough

Installation scripts for the CUA driver are updated to compute the Rust workspace root from libs/cua-driver/rust/ and resolve the post-install hints file from the script directory. Both Bash and PowerShell scripts make parallel path resolution updates.

Changes

Rust workspace and hints path resolution

Layer / File(s) Summary
Bash script workspace and path resolution
libs/cua-driver/scripts/_install-local-rust.sh
REPO_ROOT now resolves to the Rust workspace under libs/cua-driver/rust/. Skill pack staging source and post-install hints file paths are updated to use the new root and script directory locations respectively.
PowerShell script workspace and path resolution
libs/cua-driver/scripts/install-local.ps1
$RepoRoot is updated to resolve the Rust workspace under libs/cua-driver/rust/. Post-install hints file ($HintsTxt) is changed to load from the script directory instead of the repo-root-derived path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • trycua/cua#1664: Both PRs adjust the installers' post-install hint loading—centralizing/pointing to the shared post-install-hints.txt and keeping {{BINARY}} substitution consistent—so the main PR's _install-local-rust.sh/install-local.ps1 path fixes are directly aligned with the retrieved PR's shared hints work.

Poem

🐰 A script hops along a clearer path,
From parent's shadow to the workshop's math,
Bash and PowerShell dance in tandem grace,
Finding hints beside them in their place.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating Rust dev installer scripts to point to the correct Rust workspace location (libs/cua-driver/rust/) after the scripts were relocated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-install-local-rust-source-path

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 and usage tips.

@f-trycua
f-trycua merged commit 2ebadd5 into main May 24, 2026
5 of 7 checks passed
@f-trycua
f-trycua deleted the fix-install-local-rust-source-path branch May 24, 2026 11:15
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