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
{{ message }}
Repository navigation
Function ".onUnload" is not executed when "load_all" is called #148
Hi, version 1.2 does not execute .onUnload function if defined within an R package. I'm not sure this an intended behaviour as this means that any clean up code a package maintainer defined is not executed. For instance shiny::removeInputHandler is commonly placed in .onUnload to clean up after shiny::registerInputHandler in .onLoad.
changed the title [-]Function ".onUnload" is not executed with "load_all" is called[/-][+]Function ".onUnload" is not executed when "load_all" is called[/+]on Mar 1, 2021
It does if you explicitly call unload(), however pkgload::load_all() no longer fully unloads the namespace as of #133, as doing so can cause crashes for packages using compiled code.
So this is working as designed. If your usage is assuming the uload is called you will need to explicitly call unload() before running load_all().
Activity
[-]Function ".onUnload" is not executed with "load_all" is called[/-][+]Function ".onUnload" is not executed when "load_all" is called[/+]jimhester commentedon Mar 4, 2021
It does if you explicitly call
unload(), howeverpkgload::load_all()no longer fully unloads the namespace as of #133, as doing so can cause crashes for packages using compiled code.So this is working as designed. If your usage is assuming the uload is called you will need to explicitly call
unload()before runningload_all().Mention current reset behavior in man page