Skip to content

feat(source): bounded C++ function analysis - #210

Closed
zackees wants to merge 1 commit into
feat/config-tomlfrom
feat/source-cpp
Closed

zackees wants to merge 1 commit into
feat/config-tomlfrom
feat/source-cpp

Conversation

@zackees

@zackees zackees commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Refs #209. Coordinated with FastLED/cli#242. Stacked on #208; upstream must land before published-release adoption.

Adds optional source-cpp with private exact tree-sitter0.26.11/cpp0.23.4. Owned records expose definition headers, byte ranges, and syntax-context flags; no backend nodes/types/traits. Arduino filtering, tab order, deduplication, generated includes, source maps and snapshot publication remain consumer policy. Preserves fbuild provenance.

Bounds: source8MiB before parsing; two-second cooperative parser deadline (not a hard CPU deadline); iterative traversal131072visits/depth256 and output16384records afterward. Not a compiler or independent parser-memory quota. AST-based parameter-default removal copies retained spans linearly and preserves line-comment terminators.

Validation: missing API RED→GREEN; additional line-comment regression RED→GREEN. Eight focused tests cover default expressions, scope/linkage, templates, attributes, function pointers, ranges, incomplete syntax, source/depth rejection, and comments. Full source-cpp feature suite, strict all-target Clippy, formatting, Ruff, dependency-isolation RED→GREEN, WindowsMSVC/macOSARM cross-checks, and read-only review passed locally. An overlapping no-cache crosscheck was refused by Soldr; serialized checks subsequently passed.

FastLED adoption and its real WASM compile remain pending. No performance or browser/Safari acceptance claim. CI is required before merge.

@zackees

zackees commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

FastLED adoption is pushed in FastLED/cli#242 at73c2a33. Removed both direct parser dependencies/imports and local generic traversal/default-removal implementation. App retains Arduino filtering/deduplication/tab/editor policy. Dependency ban and line-comment regression observed RED→GREEN; all270Rust tests,32Python1skip,Ruff,strictalltargetClippy,fmt,CLIbuild and review passed. Fresh real WASM compile with forward helper call, default argument and line comments passed; inspected generated wrapper preserves newline before semicolon and removes default correctly. UnchangedEmscripten4.0.21; noJSPIentrypoints in output. Browser/Safari and exactpublishedrelease acceptance remain pending.

@zackees

zackees commented Sep 14, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded: #220 replayed this stacked FastLED foundation onto current main after the #216 merge diverged, and it has landed.

Verified against origin/main (e0666e0): every file this PR's own commits add exists on main, and every distinctive added source/test line is present on main (one JSON doc-comment line was reworded). Merging this branch now would only reintroduce pre-refactor code that main has since replaced.

Reopen if something here is still missing from main.

@zackees zackees closed this Sep 14, 2026
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.

1 participant