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
I think this is a more general problem with macros being expanded before the package is loaded, I've run into it when e.g. calling Zygote.@adjoint within a block. Moving the code into a file is a work-around:
julia>using Requires
shell> cat test.jl
x =2@eval$x
julia>@require Requires="ae029012-a4dd-5104-9daa-d747884805df"begininclude("test.jl")
end2
julia>@require Requires="ae029012-a4dd-5104-9daa-d747884805df"begin
x =2@eval$x
end
ERROR: UndefVarError: x not defined
A MWE with Julia 1.4.2 and Requires v1.0.1:
The text was updated successfully, but these errors were encountered: