Repository navigation
fix(packaging): always rebuild the bundled fastled binary; never harvest stale copies - #166
Merged
Merged
Conversation
…est stale copies pip install . could ship a binary that predates the current source: ensure_bundled_fastled_binary() early-returned on any pre-existing src/fastled/bin/fastled[.exe], harvested old exes from ~/.cargo/bin, and pip's wheel cache reused stale 2.0.10 wheels because the version never changed. The viewer fix from #157 was effectively uninstallable. - setup.py: when Cargo.toml is present, purge stale bundled binaries (including build/lib copies) and always run soldr cargo build; drop the CARGO_HOME harvest; refresh the copied binary's mtime so setuptools' newer-checks can't keep stale build/lib copies. - Bump workspace version to 2.0.11 so the pip wheel cache key changes. - Add FASTLED_VIEWER_LOGS: the Tauri viewer injects a console/error forwarding script that POSTs to the server's new /viewer-log endpoint, which echoes lines to stderr for diagnosability. - Regression tests for the staleness paths and the new endpoint. Closes #165 Refs #160 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 #165
Refs #160 (this PR includes the 2.0.11 version bump)
Summary
pip install .from a checkout containing viewer fix #157 still installed a pre-fix binary showing "Not Found" in the Tauri viewer. Three staleness layers caused this (forensics in #165):ensure_bundled_fastled_binary()early-returned on any pre-existingsrc/fastled/bin/fastled[.exe]with no freshness check._copy_first_available_binary()harvested stale exes from~/.cargo/bin.fastled-2.0.10wheels because the version never bumped.Changes:
Cargo.tomlis present, purge stale bundled binaries (incl.build/lib*/fastled/bincopies) and always runsoldr cargo build --release; drop theCARGO_HOMEharvest entirely; refresh the copied binary's mtime so setuptools' mtime-based "newer" checks can't resurrect stalebuild/libcopies. Fails loud when neitherCargo.tomlnor a bundled binary exists.Cargo.toml+Cargo.lock) so pip's name+version cache key changes; also the bump release: cut v2.0.11 with viewer fix #157 + add viewer-wiring regression gate #160 needs for the release cut.FASTLED_VIEWER_LOGS=1injects an initialization script into the Tauri webview forwardingconsole.*, uncaught errors, unhandled rejections, and failed fetches to a newPOST /viewer-logendpoint on the HTTP server, which echoes[viewer] ...lines to stderr. Documented in README.tests/unit/test_setup_packaging.py(staleness paths, no-CARGO_HOME-harvest, fail-loud, mtime refresh) and Rust tests for the endpoint, env-flag parsing, and the injected script.Test plan
uv run pytest tests/unit/— 8 passed (5 new packaging tests + 3 existing smoke tests, incl. the Python/Cargo version-match test at 2.0.11)soldr cargo test --workspace— 144 passed (incl. new/viewer-logendpoint test and tauri_viewer tests)cargo fmt --check,clippy -D warnings, ruff/black/isort/pyright — cleanuv run pytestwheel build in the worktree exercised the new always-rebuild path end-to-end (zccache makes the forced rebuild near-instant)ban_std_pathbufdylint stage ofbash lintfails to compiledylint_driver 5.0.0againstnightly-2026-03-26on this machine — pre-existing onmain, unrelated to this diff🤖 Generated with Claude Code