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
Would it make sense to update the imports environments of all loaded packages when a package is reloaded with load_all()? Currently these imports are scoped in a dangling namespace.
This is particularly problematic when .Call()ing dangling function pointers e.g. r-lib/testthat#654.
This could be solved by searching through all imports envs for all functions scoped in the package namespace and update their closure envs with the new namespace.
I don't really love having the environment unlocking code in the branch. Simply updating the existing symbols to the new definitions should be enough for this case at least...
Activity
jimhester commentedon Oct 23, 2017
I have a WIP at https://github.com/jimhester/pkgload/tree/redo-imports that fixes this by re-creating the imports environment for all loaded packages that import functions from the package being loaded by pkgload.
I don't really love having the environment unlocking code in the branch. Simply updating the existing symbols to the new definitions should be enough for this case at least...
The current state does fix the issue however.
lionel- commentedon Feb 13, 2018
thanks!
Re-create the imports environment of packages when reloading