r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
646 stars 57 forks source link

Fix code and help db error when reinstalling packages that are (or were) loaded #495

Open gaborcsardi opened 1 year ago

gaborcsardi commented 1 year ago

For the code db, we need to hit all (well, S3 methods would be probably enough) promises before unloading, and for the help db, we need to flush the db after the new version is installed:

.Internal(lazyLoadDBflush(system.file(package = "<pkg>", "help", "<pkg>.rdb")))

In case the user reloads the package.