Skip to content

Use name_val instead of JS.sourcetext#584

Merged
aviatesk merged 1 commit intomasterfrom
avi/583
Mar 9, 2026
Merged

Use name_val instead of JS.sourcetext#584
aviatesk merged 1 commit intomasterfrom
avi/583

Conversation

@aviatesk
Copy link
Owner

@aviatesk aviatesk commented Mar 9, 2026

Use the name_val attribute directly to retrieve identifier names inside K"inert" nodes, instead of going through sourcetext. This avoids a crash when SyntaxTree nodes have LineNumberNode provenance (which occurs for nodes created via expr_to_est during old-style macro expansion), since sourcetext would fail with MethodError on such nodes.

Also simplify the foreach_inert_identifier /
foreach_identifier_in_inert helpers by removing the unnecessary _-prefixed indirection.

Fixes #583

Use the `name_val` attribute directly to retrieve identifier
names inside `K"inert"` nodes, instead of going through
`sourcetext`. This avoids a crash when `SyntaxTree` nodes have
`LineNumberNode` provenance (which occurs for nodes created via
`expr_to_est` during old-style macro expansion), since
`sourcetext` would fail with `MethodError` on such nodes.

Also simplify the `foreach_inert_identifier` /
`foreach_identifier_in_inert` helpers by removing the
unnecessary `_`-prefixed indirection.

Fixes #583
@aviatesk aviatesk changed the title inert-identifiers: Use name_val instead of sourcetext Use name_val instead of sourcetext Mar 9, 2026
@aviatesk aviatesk changed the title Use name_val instead of sourcetext Use name_val instead of JS.sourcetext Mar 9, 2026
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.74%. Comparing base (018aa0b) to head (4747008).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #584      +/-   ##
==========================================
+ Coverage   67.72%   67.74%   +0.01%     
==========================================
  Files          51       51              
  Lines        8311     8315       +4     
==========================================
+ Hits         5629     5633       +4     
  Misses       2682     2682              
Flag Coverage Δ
JETLS.jl 67.74% <100.00%> (+0.01%) ⬆️

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.

@aviatesk aviatesk merged commit dd6cf5f into master Mar 9, 2026
18 of 19 checks passed
@aviatesk aviatesk deleted the avi/583 branch March 9, 2026 05: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.

JETLS 2026-03-08 Crashes

1 participant