Skip to content

fix: exclude generated IntelliSense snapshots from compiler inputs #248

Closed

Description

@zackees

Context

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.

Coordinated with #242.

Activity

  1. zackees commented on Sep 13, 2026

    @zackees
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions