Skip to content

fix(lua): extract assigned function expressions - #1623

Closed
danusha2345 wants to merge 7 commits into
colbymchenry:mainfrom
danusha2345:fix/1616-lua-function-expressions
Closed

danusha2345 wants to merge 7 commits into
colbymchenry:mainfrom
danusha2345:fix/1616-lua-function-expressions

Conversation

@danusha2345

Copy link
Copy Markdown
Contributor

Summary

Fixes #1616.

  • index function expressions assigned to locals, table members, static keyed fields, and nested callback tables
  • attribute calls inside those expressions to the callable node instead of the file node
  • keep dynamic bracket keys unguessed and avoid extra variable nodes for ordinary member assignments
  • implement the same behavior in the TypeScript/WASM and native Rust extraction paths
  • bump the extraction version and add extraction, resolution, callers, and kernel-parity regressions

Verification

  • npm run build:kernel
  • npm run build
  • focused extraction/resolution/native parity suite — 820 passed
  • npm test -- --reporter=dot — 194 files, 3231 passed, 10 skipped

@danusha2345
danusha2345 force-pushed the fix/1616-lua-function-expressions branch from 2f0c630 to aa77706 Compare August 28, 2026 07:03
danusha2345 added 2 commits September 8, 2026 11:12
@danusha2345

Copy link
Copy Markdown
Contributor Author

Merged current main (3adf067, post-#1770) into this branch: head 5c6b239. The only conflict was the CHANGELOG entry; no source conflict. tsc clean, the branch's tests pass.

@danusha2345

Copy link
Copy Markdown
Contributor Author

Merged current main (43271f3) into this branch: head c8dbf8c. The only conflict was the CHANGELOG entry; no source conflict. tsc clean, the branch's tests pass.

@danusha2345

Copy link
Copy Markdown
Contributor Author

Merged current main (85550eb) into this branch: head 9e82668. The only conflict was the CHANGELOG entry; no source conflict. tsc clean, the branch's tests pass.

@danusha2345

Copy link
Copy Markdown
Contributor Author

Merged current main (8733c28) into this branch: head d344b85. The only conflict was the CHANGELOG entry; no source conflict. tsc clean, the branch's tests pass.

@colbymchenry

Copy link
Copy Markdown
Owner

Landed onto current main via #1778 (fixes #1650 / #1616). Source/test files kept byte-identical to this PR; changelog cites both #1616 and #1650. Thanks @danusha2345 — closing this as superseded by #1778.

@colbymchenry

Copy link
Copy Markdown
Owner

Superseded by #1778 which lands this fix for #1650/#1616 on current main.

colbymchenry added a commit that referenced this pull request Sep 8, 2026
Apply upstream PR #1623 by danusha2345 (fix commit aa77706),
which also addresses #1616, to the current main base. Preserve the
upstream WASM and Rust implementations and regression coverage.

Index assigned locals, table members, static string keys and nested
callback tables as callable symbols, with calls owned by those symbols.
Keep dynamic keys unguessed. Add #1650 to the Unreleased changelog and
retain the existing re-index guidance without an extraction-version bump.

Verified on Linux x64 with Node 22.19.0:
- native kernel build, tsc, asset copy, executable CLI
- issue repro: 3 nodes / 2 edges -> 4 nodes / 4 edges
- EPR.PowerController::SyncHydroPower is indexed; its caller is client.lua
- syncHydroPower depth-2 impact reaches client.lua
- extraction/resolution/Lua parity: 844 tests passed (kernel expected)
- forced-WASM Lua/Luau extraction/resolution: 20 tests passed

Co-authored-by: Colby McHenry <colbymchenry@users.noreply.github.com>
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.

Lua: function expressions assigned to table fields/keys produce no node — their calls are attributed to the file, so callers/impact silently omit them

2 participants