Skip to content

Commit 7e1c8e6

Browse files
committed
diagnostic: Use resolve_scopes soft_scope kwarg directly
JuliaLang/julia#61476 allows us to remove the `insert_softscope_marker` workaround that inserted `K"softscope"` nodes into the AST and pass the `soft_scope` keword arg directly instead.
1 parent 4aee30f commit 7e1c8e6

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
2727
[sources]
2828
Compiler = {rev = "avi/julia-JETLS-Compiler-head-2026-03-15", subdir = "Compiler", url = "https://github.com/JuliaLang/julia"}
2929
JET = {rev = "476bd141", url = "https://github.com/aviatesk/JET.jl"}
30-
JuliaLowering = {rev = "avi/julia-JETLS-JSJL-head-2026-03-28", subdir = "JuliaLowering", url = "https://github.com/JuliaLang/julia"}
31-
JuliaSyntax = {rev = "avi/julia-JETLS-JSJL-head-2026-03-28", subdir = "JuliaSyntax", url = "https://github.com/JuliaLang/julia"}
30+
JuliaLowering = {rev = "avi/JL-fix-soft-scope", subdir = "JuliaLowering", url = "https://github.com/JuliaLang/julia"}
31+
JuliaSyntax = {rev = "avi/JL-fix-soft-scope", subdir = "JuliaSyntax", url = "https://github.com/JuliaLang/julia"}
3232
LSP = {path = "LSP"}
3333

3434
[compat]

src/utils/binding.jl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ function is_relevant(ctx3::JL.AbstractLoweringContext,
2929
|| cursor > start)
3030
end
3131

32-
function insert_softscope_marker(st1::JS.SyntaxTree)
33-
g = JS.syntax_graph(st1)
34-
marker = JS.newleaf(g, st1, JS.K"softscope")
35-
children = JS.SyntaxList(g)
36-
push!(children, marker, st1)
37-
return JS.newnode(g, st1, JS.K"block", children)
38-
end
39-
4032
"""
4133
jl_lower_for_scope_resolution(
4234
mod::Module, st0::JS.SyntaxTree;
@@ -91,10 +83,7 @@ function _jl_lower_for_scope_resolution(
9183
soft_scope::Bool = false,
9284
)
9385
ctx2, st2 = JL.expand_forms_2(ctx1, st1)
94-
if soft_scope
95-
st2 = insert_softscope_marker(st2)
96-
end
97-
ctx3, st3 = JL.resolve_scopes(ctx2, st2)
86+
ctx3, st3 = JL.resolve_scopes(ctx2, st2; soft_scope)
9887
convert_closures || return (; st0, st1, st2, st3, ctx3)
9988
ctx4, st4 = JL.convert_closures(ctx3, st3)
10089
return (; st0, st1, st2, st3, st4, ctx3, ctx4)

0 commit comments

Comments
 (0)