Closed Keno closed 1 month ago
Also needs a 1.11 backport.
For my own reference pre-1.9 this was a direct ccall https://github.com/JuliaLang/julia/pull/44753
It feels a little premature to say that
invokelatest
will definitely work in exactly this way
That's why I said may be required
not will be required
;). Also you actually have to hit the github approve button or I can't merge this without using evil superuser priviliges.
As discussed in [1], the implicit creation of bindings through the setglobal! intrinsic was accidentally added in 1.9 unintentionally and will be removed (ideally) or at the very least deprecated in 1.11.
The recommended replacement syntax is
Core.eval(mod, Expr(:global, sym))
to introduce the binding andinvokelatest(setglobal!, mod, sym, val)
to set it. The invokelatest is not presently required, but may be required for https://github.com/JuliaLang/julia/pull/54654, so it's included in the recommendation.[1] https://github.com/JuliaLang/julia/issues/54607