Repository navigation
feat: unlock the installed fastled.exe image on Windows while running - #164
Merged
Merged
Conversation
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>
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.
Closes #163
Summary
install_unlockmodule: on Windows startup, rename our own image to afastled.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 — sorm -rf venv/ pip reinstall no longer fails on a locked exe..old.*siblings on every launch, ignoring deletion failures (an OS file lock doubles as the liveness check — same pattern as zccache/soldr).maybe_reexec_from_managed_runtimebefore the managed-runtime relocation, skipped for copies already under~/.fastled/runorupdate(those are GC-owned), with aFASTLED_NO_UNLOCK=1opt-out. Everything is best-effort and can never fail the launch.Test plan
.oldsibling + byte-identical canonical copy; sweep removes stale siblings; env opt-out; already-renamed image only sweeps; missing exe toleratedsoldr cargo test --workspace— 140 passedsoldr cargo clippy --workspace --all-targets -- -D warnings,soldr cargo fmt --alluv run pytest tests/unit/test_python_api.py— 3 passed🤖 Generated with Claude Code