Skip to content

Commit 10cb888

Browse files
committed
Filter on exported symbols in 1.11
See JuliaLang/julia#50105 (comment) for context
1 parent 3b37549 commit 10cb888

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

β€Žsrc/runner/PlutoRunner.jl

+9-1
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,17 @@ function try_macroexpand(mod::Module, notebook_id::UUID, cell_id::UUID, expr; ca
324324
return (sanitize_expr(expr_to_save), expr_hash(expr_to_save))
325325
end
326326

327+
function exported_names(mod::Module)
328+
@static if VERSION β‰₯ v"1.11.0-DEV.469"
329+
filter!(b -> isexported(mod, b), names(mod; all=true))
330+
else
331+
names(mod)
332+
end
333+
end
334+
327335
function get_module_names(workspace_module, module_ex::Expr)
328336
try
329-
Core.eval(workspace_module, Expr(:call, :names, module_ex)) |> Set{Symbol}
337+
Core.eval(workspace_module, Expr(:call, exported_names, module_ex)) |> Set{Symbol}
330338
catch
331339
Set{Symbol}()
332340
end

β€Žtest/ExpressionExplorer.jl

-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ end
805805
(" πŸ•πŸ•", (6, 10), (3, 5)), # a πŸ• is two UTF16 codeunits
806806
]
807807
for (s, (start_byte, end_byte), (from, to)) in tests
808-
@show s
809808
@test PlutoRunner.map_byte_range_to_utf16_codepoints(s, start_byte, end_byte) == (from, to)
810809
end
811810
end

0 commit comments

Comments
Β (0)