Bioconductor / BiocCheck

http://bioconductor.org/packages/BiocCheck
8 stars 26 forks source link

can crash if BiocPkgTools attached #158

Closed vjcitn closed 2 years ago

vjcitn commented 2 years ago

in a checkout of BiocFileCache, use BiocCheck::BiocCheck()

> library(BiocPkgTools)
2/54 packages newly attached/loaded, see sessionInfo() for details.
> BiocCheck::BiocCheck()
─ BiocCheckVersion: 1.32.0
─ BiocVersion: 3.15
─ Package: BiocFileCache
─ PackageVersion: 2.4.0
─ sourceDir: /Users/vincentcarey/BiocBuildTools/NEWCHK/BiocFileCache
─ installDir: /var/folders/n4/p9th81md60s8nv12yv40sv8m0000gp/T//Rtmpj9TrGZ/filec2cb5bbd29d
─ BiocCheckDir: /Users/vincentcarey/BiocBuildTools/NEWCHK/BiocFileCache.BiocCheck
─ platform: unix
─ isTarBall: FALSE

* Installing package...
* Checking package dependencies...
Error in unloadNamespace(pkg_ns) : 
  namespace 'BiocFileCache' is imported by 'BiocPkgTools' so cannot be unloaded

Enter a frame number, or 0 to exit   

1: BiocCheck::BiocCheck()
2: checkForBadDepends(package_dir, package_name, libloc)
3: unloadNamespace(pkg_ns)

Selection: 
LiNk-NY commented 2 years ago

I've been testing this with callr and it looks like it might work:

callr::r(
  function(package) {BiocCheck::BiocCheck(package)}, 
  args = list(package = "~/BiocFileCache/"), repos = BiocManager::repositories(), show = TRUE
)

This will avoid interference with your current session.

Best, Marcel

LiNk-NY commented 2 years ago

See the https://github.com/Bioconductor/BiocCheck/tree/callr branch

LiNk-NY commented 2 years ago

Hi Vince, @vjcitn You can enable this with BiocCheck(callr = TRUE) Best, Marcel