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
Prohibit binding replacement in closed modules during precompile (#57425)
This applies the existing prohibition against introducing new bindings
in a closed module to binding replacement as well (for the same reason -
the change won't be persisted after reload). It is pretty hard to even
reach this point, since `eval` into closed modules is already prohibited
and there's no surface syntax for cross-module declaration, but it is
technically reachable from lowered IR. Further, in the future we may
make all of these builtins, which would make it easier. Thus, be
consistent now and fully disallow binding replacement in closed modules
during precompile.
ji, ofile = Base.compilecache(Base.PkgId("BindingReplaceDisallow"))
2329
+
@evalusing BindingReplaceDisallow
2330
+
invokelatest() do
2331
+
@test BindingReplaceDisallow.sinreplace.msg =="Creating a new global in closed module `Base` (`sin`) breaks incremental compilation because the side effects will not be permanent."
0 commit comments