Skip to content

binding/occurrence: Resolve names in quoted expressions#801

Merged
aviatesk merged 1 commit into
masterfrom
fix-inert-occurrences
Jul 17, 2026
Merged

binding/occurrence: Resolve names in quoted expressions#801
aviatesk merged 1 commit into
masterfrom
fix-inert-occurrences

Conversation

@aviatesk

Copy link
Copy Markdown
Owner

References, rename, document highlights, and unused-import diagnostics could miss or misclassify identifiers inside quoted expressions. Generated arguments could also be confused with same-named inner bindings, producing incomplete references and unsafe rename edits.

Introduce a shared inert resolver for target selection and occurrence collection. Code-shaped ordinary quotes resolve in their construction module, macro quotes in definition scope, and generated bodies in a synthetic function scope with exact argument remapping. Direct interpolation remains in its enclosing lexical scope, while nested generated-output interpolation follows its corresponding quote stage.

Track quote and interpolation stages when classifying nested macrocalls. Support one-argument @eval in bare and Base.@eval forms, @generated and Base.@generated, and direct esc(...) or Base.esc(...) boundaries. Two-argument @eval and escaped free names remain unresolved.

This intentionally uses a pragmatic construction-site approximation. Atomic Symbol flow, indirect escape flow, nested quoted values inside @eval, general qualified or aliased new-style macro resolution, and confidence-aware filtering of generated temporary expressions remain future work.

References, rename, document highlights, and unused-import diagnostics
could miss or misclassify identifiers inside quoted expressions.
Generated arguments could also be confused with same-named inner
bindings, producing incomplete references and unsafe rename edits.

Introduce a shared inert resolver for target selection and occurrence
collection. Code-shaped ordinary quotes resolve in their construction
module, macro quotes in definition scope, and generated bodies in a
synthetic function scope with exact argument remapping. Direct
interpolation remains in its enclosing lexical scope, while nested
generated-output interpolation follows its corresponding quote stage.

Track quote and interpolation stages when classifying nested macrocalls.
Support one-argument `@eval` in bare and `Base.@eval` forms,
`@generated` and `Base.@generated`, and direct `esc(...)` or
`Base.esc(...)` boundaries. Two-argument `@eval` and escaped free
names remain unresolved.

This intentionally uses a pragmatic construction-site approximation.
Atomic `Symbol` flow, indirect escape flow, nested quoted values inside
`@eval`, general qualified or aliased new-style macro resolution, and
confidence-aware filtering of generated temporary expressions remain
future work.

Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.85057% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.59%. Comparing base (5880856) to head (74bee1f).

Files with missing lines Patch % Lines
src/utils/binding.jl 98.39% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #801      +/-   ##
==========================================
+ Coverage   78.29%   78.59%   +0.30%     
==========================================
  Files          62       62              
  Lines       13257    13398     +141     
==========================================
+ Hits        10379    10530     +151     
+ Misses       2878     2868      -10     
Flag Coverage Δ
JETLS.jl 78.59% <98.85%> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aviatesk
aviatesk merged commit 8124536 into master Jul 17, 2026
18 of 19 checks passed
@aviatesk
aviatesk deleted the fix-inert-occurrences branch July 17, 2026 19:25
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