Skip to content

feat: unlock the installed fastled.exe image on Windows while running - #164

Merged
zackees merged 1 commit into
mainfrom
feat/unlock-install-exe
Jun 12, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/unlock-install-exe

Conversation

@zackees

@zackees zackees commented Jun 12, 2026

Copy link
Copy Markdown
Member

Closes #163

Summary

  • New install_unlock module: on Windows startup, rename our own image to a fastled.exe.old.<pid^nanos> sibling (legal while running, same dir/volume), copy it back to the canonical name, and keep running from the renamed file — so rm -rf venv / pip reinstall no longer fails on a locked exe.
  • Sweep stale .old.* siblings on every launch, ignoring deletion failures (an OS file lock doubles as the liveness check — same pattern as zccache/soldr).
  • Wired into maybe_reexec_from_managed_runtime before the managed-runtime relocation, skipped for copies already under ~/.fastled/run or update (those are GC-owned), with a FASTLED_NO_UNLOCK=1 opt-out. Everything is best-effort and can never fail the launch.

Test plan

  • 5 new unit tests (Windows-only): trampoline creates .old sibling + byte-identical canonical copy; sweep removes stale siblings; env opt-out; already-renamed image only sweeps; missing exe tolerated
  • soldr cargo test --workspace — 140 passed
  • soldr cargo clippy --workspace --all-targets -- -D warnings, soldr cargo fmt --all
  • uv run pytest tests/unit/test_python_api.py — 3 passed

🤖 Generated with Claude Code

Rename the install-location image to a .old.<token> sibling at startup,
copy it back to the canonical name, and keep running from the renamed
file so the venv/pip install dir can be deleted while fastled runs.
Stale .old.* siblings are swept best-effort on every launch; copies
under the managed run/update roots are skipped, and FASTLED_NO_UNLOCK=1
opts out. Mirrors the zccache/soldr trampoline prior art.

Closes #163

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@zackees
zackees merged commit c69997e into main Jun 12, 2026
24 of 25 checks passed
@zackees
zackees deleted the feat/unlock-install-exe branch June 12, 2026 01:07
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.

feat(runtime): unlock the installed fastled.exe while running (zccache-style rename trick) so pip can upgrade/uninstall mid-session

1 participant