Skip to content

definition: Support global binding definitions#487

Merged
aviatesk merged 1 commit intomasterfrom
avi/global-binding-definition
Jan 16, 2026
Merged

definition: Support global binding definitions#487
aviatesk merged 1 commit intomasterfrom
avi/global-binding-definition

Conversation

@aviatesk
Copy link
Owner

Add find_global_binding_definitions to find definition sites for global bindings across the package using binding occurrence analysis. Previously, go-to-definition for global variables couldn't find their definition sites since runtime reflection doesn't provide binding location information.

The implementation benefits from the binding occurrences cache, avoiding redundant lowering for consecutive definition requests.

Also refactors handle_DefinitionRequest to call
_select_target_binding once and reuse the result for both local and global binding paths.

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 88.09524% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.67%. Comparing base (e8eca7c) to head (3b703e0).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/definition.jl 88.09% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #487      +/-   ##
==========================================
+ Coverage   67.51%   67.67%   +0.16%     
==========================================
  Files          46       46              
  Lines        6544     6574      +30     
==========================================
+ Hits         4418     4449      +31     
+ Misses       2126     2125       -1     
Flag Coverage Δ
JETLS.jl 67.67% <88.09%> (+0.16%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

Add `find_global_binding_definitions` to find definition sites for
global bindings across the package using binding occurrence analysis.
Previously, go-to-definition for global variables couldn't find their
definition sites since runtime reflection doesn't provide binding
location information.

The implementation benefits from the binding occurrences cache, avoiding
redundant lowering for consecutive definition requests.

Also refactors `handle_DefinitionRequest` to call
`_select_target_binding` once and reuse the result for both local and
global binding paths.
@aviatesk aviatesk force-pushed the avi/global-binding-definition branch from 6317b08 to 3b703e0 Compare January 16, 2026 16:47
@aviatesk aviatesk merged commit 39a0742 into master Jan 16, 2026
12 of 13 checks passed
@aviatesk aviatesk deleted the avi/global-binding-definition branch January 16, 2026 17:23
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