Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (2)
📒 Files selected for processing (21)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughElixir ingestion now distinguishes inert quote syntax from enabled ChangesElixir quote semantics and capture
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No merge-blocking issue is established for this change; it is ready for normal merge checks. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@LaimaWu this looks great, we are in a couple day delay/holding pattern from using a lot of tokens this weekend (~8 branches of nice improvements almost delivered), get more tokens Wednesday morning... |
|
Thanks @LaimaWu — this is a lovely first PR: red-first on One housekeeping note: CI hasn't run on this branch yet because GitHub holds workflow runs from a new contributor's fork until a maintainer approves them. That's on our side, not yours, and we'll get it approved. |
Closes #357.
Problem
Quoted Elixir AST should not produce call edges. Evaluated
unquote/unquote_splicingarguments should. Main suppresses both and silently drops quoted call candidates from declined accounting.Red-first reproduction
The expanded existing
elixircheck.shfails on upstream255dc199withunquote(bar(x)) lost its live call edge. A preserved fixture moves from 3 edges / 0 declined to 7 edges / 4 declined; removing its four inert sites moves the declined count by four. Negative controls and red cases cover nested quotes, quote options, declaration/metadata holes, quoted module scope, operator/capture counting and a C++ CDATA marker collision.Root cause
elixirQuotedtreated every quote ancestor as inert. It did not distinguish the quote body from evaluated options or live holes. Declaration/pattern filters and module lookup also followed quoted ancestors into evaluated arguments.Implementation
A small shared ancestor walker classifies inert boundaries and live holes through an Elixir adapter. Capture extraction and lexical context use the same decision. Current query predicates are not evaluated, and Elixir special forms use ordinary call nodes; inert/live query captures would still need the same target/body classification in C++. The shared hook fits that architecture. No #374 hook-table refactor.
Live-hole semantics
An enabled hole consumes one enclosing quote boundary; walking continues through outer boundaries. A quote nested inside a live hole becomes inert again. Quote option expressions remain live.
bind_quoteddisables holes by default; literalunquote: trueenables them, while false/unknown values remain conservative. Live arguments retain their real lexical module and bypass outer quoted heads/metadata. Ordinary functions namedquote/comment, and calls after the region, stay live.Counted, not dropped
Captured inert ordinary calls, operators and named captures persist as
RefRole::Inert. Graph building records existingDeclined/ callerdeclinedOutaccounting without edges or target candidates.declined=anddeclined_calls=expose those sites with conditional full/compact explanations. Bare variable-shaped AST does not inflate the count; inert sites create no uses, possible-caller or impact candidates.Validation and byte identity
Validated final SHA b479b4f against pristine main 255dc19 on macOS, with clean development, G1 and Release/LTO builds.
oswin32logiccheckfails in libc++23's intentional integer conversion, also reproduced on pristine main; its separate platform-compiler rerun, including sanitizer and mutant controls, passes. The separately scopededitchecknotecheckreference-binary rerun passes. Other skips are the optionalargvdiffcheckreference, the unavailable map-section arm and the Apple Silicon portable-build arm on this Intel host.--clonescontrols include ripwire (total=641) and the vendored tree-sitter runtime snapshot (total=26); C/C++ grammar snapshots have zero clones and serve as additional controls. Existing golden bytes are unchanged.--no-cache.Local baseline failure: On this macOS host, memguardcheck B8/B8b fail on both pristine upstream main (255dc19) and this branch: both correctly terminate with rc=5 and no answer, but the real 64M hard-limit reading fires at graph build rather than at the ingest phase asserted by the gate. The four controlled calls use the same compiler, build type, machine, fixture and commands: rc=5, stdout=0 bytes, phase=graph build, and complete stderr is byte-identical. No memory-guard code was changed in this PR. All #357-specific gates and all other non-baseline required gates pass. B8/B8b are not described as passing.
The complete suite uses the documented CI-default environment (optional historical reference-binary variables unset); raw comparison and scoped reference checks are recorded separately.
Clojure / #349 boundary
#349 has not landed. Clojure quote/discard/comment integration remains a follow-up after it lands, as accepted in #357. This PR implements only #357's Elixir arm. Associated optimization-file registration and shifted navigation captures/generated reference are updated separately.
Parser pin
Main uses 143 lean / 144 rich. This branch uses the next free temporary parser value 145 and its quality mirror: train renumbers. Cache 28 / quality scheme 17 remain unchanged; the extraction hash is re-pinned separately.
Summary by CodeRabbit
unquoteexpressions from inert quoted code, preserving call relationships only for evaluated expressions.