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
If you do Pkg.update(), it should keep track of whether it updates any modules that were already imported into Main. If so, it should print a warning message telling the user that they will need to restart Julia if they want to use the updated modules.
Should be pretty easy to implement. (I would prefer that we don't print the warning unconditionally, e.g. if no imported modules were updated.)
pkgsym =Symbol(pkg)
ifisdefined(Main, pkgsym) &&typeof(getfield(Main, pkgsym)) == Module
warn("Package $pkg has been updated but it was already imported.")
warn("Restart Julia to use the updated version.")
end
@helgee, yes, something like that. Note that you'll want to call warn only once (you can pass it a multi-line string). You can use isa(x, Foo) rather than typeof(x) == Foo.
helgee
added a commit
to helgee/julia
that referenced
this issue
Aug 26, 2016
If you do
Pkg.update()
, it should keep track of whether it updates any modules that were already imported intoMain
. If so, it should print a warning message telling the user that they will need to restart Julia if they want to use the updated modules.Should be pretty easy to implement. (I would prefer that we don't print the warning unconditionally, e.g. if no imported modules were updated.)
See also #18150, cc @vtjnash.
The text was updated successfully, but these errors were encountered: