Skip to content

binding/occurrence: Resolve new-style macros by object identity#802

Merged
aviatesk merged 1 commit into
masterfrom
fix-macro-resolution
Jul 19, 2026
Merged

binding/occurrence: Resolve new-style macros by object identity#802
aviatesk merged 1 commit into
masterfrom
fix-macro-resolution

Conversation

@aviatesk

Copy link
Copy Markdown
Owner

Qualified and aliased new-style macros such as Test.@test were classified by source spelling. This missed aliases and could preserve unrelated user-defined macros with the same name, producing incorrect binding results in references, rename, highlights, and diagnostics.

Resolve source macro names in the request module and world, then compare the resulting macro object with the registered defining-module binding. Thread the captured world through lowering and binding selection so all related analyses use a consistent snapshot. Nested module bodies switch to their resolved module context.

Preserved new-style calls still recurse into their arguments so nested old-style calls and @static are handled. Coverage includes qualified, aliased, same-named, nested-module, and generated/eval cases.

Qualified and aliased new-style macros such as `Test.@test` were
classified by source spelling. This missed aliases and could preserve
unrelated user-defined macros with the same name, producing incorrect
binding results in references, rename, highlights, and diagnostics.

Resolve source macro names in the request module and world, then compare
the resulting macro object with the registered defining-module binding.
Thread the captured world through lowering and binding selection so all
related analyses use a consistent snapshot. Nested module bodies switch
to their resolved module context.

Preserved new-style calls still recurse into their arguments so nested
old-style calls and `@static` are handled. Coverage includes qualified,
aliased, same-named, nested-module, and generated/eval cases.

Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
@aviatesk
aviatesk force-pushed the fix-macro-resolution branch from c297b81 to a959edb Compare July 19, 2026 05:06
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.91358% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.61%. Comparing base (8124536) to head (a959edb).

Files with missing lines Patch % Lines
src/document-symbol.jl 95.55% 2 Missing ⚠️
src/definition.jl 50.00% 1 Missing ⚠️
src/rename.jl 85.71% 1 Missing ⚠️
src/utils/binding.jl 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #802      +/-   ##
==========================================
+ Coverage   78.59%   78.61%   +0.01%     
==========================================
  Files          62       62              
  Lines       13398    13418      +20     
==========================================
+ Hits        10530    10548      +18     
- Misses       2868     2870       +2     
Flag Coverage Δ
JETLS.jl 78.61% <96.91%> (+0.01%) ⬆️

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 384996c into master Jul 19, 2026
18 of 19 checks passed
@aviatesk
aviatesk deleted the fix-macro-resolution branch July 19, 2026 05:39
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