You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module ImageUsing
ifisdefined(Base, :Experimental) &&isdefined(Base.Experimental, Symbol("@compiler_options"))
@eval Base.Experimental.@compiler_options compile=min optimize=0 infer=no
endexported_names(m::Module) =filter!(x -> Base.isexported(m, x), names(m; all=true, imported=true))
function_eval_export(__module__::Module, x::Any)
if x isa Symbol
returngetfield(__module__, x)
elseif x isa Expr
if x.head == :. &&length(x.args) ==2&& x.args[2] isa QuoteNode && x.args[2].value isa Symbol
v =_eval_export(__module__, x.args[1])
returngetfield(v, x.args[2].value)
elseerror("invalid export: $x")
endelseerror("invalid export: $x")
endend""" `@image_using A.B`an alternative to using to compat loading packages from custom sysimages."""macroimage_using(sections)
try
M =_eval_export(Main, sections) ::Module
ns =exported_names(M)
block =Expr(:block)
for n in ns
if!isdefined(__module__, n)
push!(block.args, :(const$n =$M.$n))
endendesc(block)
catchesc(Meta.parse("using "*string(sections)))
endendend
tyjuliacall/tyjuliasetup/__init__.py
Line 230 in 8ff48ed
The text was updated successfully, but these errors were encountered: