You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: exclude generated IntelliSense snapshots from compiler inputs #248
During kernal-api migration verification, a real quick-mode dynamic compile fails after publishing an IntelliSense snapshot. The generated wrapper includes the canonical sketch and then .fastled/intellisense/sketch.cpp, producing redefinitions of leds/setup/loop. Reproduced with the built CLI in a temporary Blink directory using --write-intellisense-snapshot followed by --quick --link=dynamic --just-compile.
Round 1 traced the compiler error to create_wrapper/collect_cpp_files in crates/fastled-cli/src/wasm_build.rs: recursion skips .build but not .fastled. Round 2 checked object fingerprinting: its source glob excludes .git, .build and fastled_js, but not generated .fastled source/header files. Snapshot publication therefore also changes the compiler input fingerprint without a source edit.
Proposal
Exclude the reserved generated .fastled directory from extra C++ collection and sketch source fingerprinting. Keep ordinary user C++ files included. This is FastLED directory policy, not a kernal-api parser change.
Acceptance criteria
Focused RED before implementation: publish a snapshot and show its generated source enters the compile wrapper; show snapshot-only changes alter the source fingerprint.
GREEN after fix: generated snapshots are absent from wrappers and fingerprints; ordinary C++ remains included and changes its fingerprint.
Re-run a real WASM compile with a populated IntelliSense directory; preserve snapshot files rather than deleting them to pass.
Workspace tests, strict Clippy and review pass.
Decisions
P2 correctness bug: editor use can prevent compilation.
Scope both compiler discovery and fingerprint policy because they describe the same source set.
Preserve compiler flags and source generation; do not modify the upstream C++ parser.
Implemented on the migration branch in 94ff518 (PR #242). Both focused regressions failed before the exclusion and now pass: generated snapshots do not enter wrappers or source fingerprints, while user C++ remains included/tracked. The real quick/dynamic WASM compile now succeeds with the IntelliSense directory retained. Publishing a subsequent unsaved editor generation preserves object, runtime and sketch cache hits. Gates pass: 286 library + 3 binary + 1 integration + 1 doc tests; Python 40 passed/1 skipped; strict Clippy, formatting, Ruff and read-only review including the follow-up. Leaving this issue open until the migration branch lands.
Activity
refactor(snapshot): use kernal-api JSON and isolate editor outputs
zackees commentedon Sep 13, 2026
Implemented on the migration branch in 94ff518 (PR #242). Both focused regressions failed before the exclusion and now pass: generated snapshots do not enter wrappers or source fingerprints, while user C++ remains included/tracked. The real quick/dynamic WASM compile now succeeds with the IntelliSense directory retained. Publishing a subsequent unsaved editor generation preserves object, runtime and sketch cache hits. Gates pass: 286 library + 3 binary + 1 integration + 1 doc tests; Python 40 passed/1 skipped; strict Clippy, formatting, Ruff and read-only review including the follow-up. Leaving this issue open until the migration branch lands.
refactor(snapshot): use kernal-api JSON and isolate editor outputs