How are packages imported affected when deleting cell? #768
-
If I have defined x = 2 in a cell, and then I erase it, then x is no longer define. But, what happens with the imported packages? For example; if Regards. Armando |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Good question! Technically, they are still there (it's not possible to fully unload something in Julia), but they are no longer available in your scope. In the future, we might prompt you to restart the notebook after unloading a package. For example, an evil package might do this in its loading process: Base.sqrt(x::Int64) = "potato"
hello(x) = "soup" After loading the package (using |
Beta Was this translation helpful? Give feedback.
-
#844 will detect this situation, and recommend to restart the notebook. |
Beta Was this translation helpful? Give feedback.
Good question! Technically, they are still there (it's not possible to fully unload something in Julia), but they are no longer available in your scope.
In the future, we might prompt you to restart the notebook after unloading a package.
For example, an evil package might do this in its loading process:
After loading the package (using
import Pakcage
in your notebook), callingsqrt(5)
will returnpotato
. After removing the cell containingimport Package
, you can no longer doPackage.hello(123)
, butsqrt(123)
will still returnpotato
. The only (simple) solution is to restart the notebook.