gagolews / stringi

Fast and portable character string processing in R (with the Unicode ICU)
https://stringi.gagolewski.com/
Other
304 stars 44 forks source link

Is it possible to unload icudt55l.dat? #241

Closed grayskripko closed 7 years ago

grayskripko commented 7 years ago

When I change .libPaths() to test my package installation process it loads stringi package. After that, I can use unload, detach and dyn.unload to release test libraries resources. But I can not delete stringi because of loaded icudt55l.dat. I don't want to restart R session because it does not make sense in a script.

gagolews commented 7 years ago

icudt is being automatically loaded by the icu libraries (icui18n, etc.)

just out of curiosity: why would you want to unload this package on run-time?

BTW, are you working in RStudio? RStudion requires stringi on run-time

grayskripko commented 7 years ago

yes, I'm working on RStudio. As I said, I test my package installation. The package depends on many other packages so sometimes I can miss something in DESCRIPTION. For testing purpose, I created an autotesting script. It creates a new empty directory where I reproduce the installation process on naked R. After this process I want to turn all back. I can change .libPaths easily but I can not delete test directory because it contains icudt55l.dat which is used. Finally, I found a workaround. I just don't test stringi. I load it in the beginning of the script using library(). After that devtools::install_github does not require it

gagolews commented 7 years ago

I guess all you need in such a scenario is a plain R CMD check --as-cran here.