HenrikBengtsson / doFuture

:rocket: R package: doFuture - Use Foreach to Parallelize via Future Framework
https://doFuture.futureverse.org
84 stars 6 forks source link

doFuture: length(x) = 3 > 1' in coercion to 'logical(1) with strict R CMD check:ing #35

Closed HenrikBengtsson closed 5 years ago

HenrikBengtsson commented 5 years ago
2019-05-01 [d121 w18.3] 00:50:35 hb-x1:~/repositories/future/revdep/checks/doFuture/old/doFuture.Rcheck
± |develop {16} ?:5 ✗| $ more 00check.log 
* using log directory ‘/home/hb/repositories/future/revdep/checks/doFuture/old/doFuture.Rcheck’
* using R version 3.6.0 (2019-04-26)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘doFuture/DESCRIPTION’ ... OK
* this is package ‘doFuture’ version ‘0.8.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘doFuture’ can be installed ... NOTE
Found the following notes/warnings:
  Non-staged installation was used
See ‘/home/hb/repositories/future/revdep/checks/doFuture/old/doFuture.Rcheck/00install.out’ for deta
ils.
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ... ERROR
  Running ‘DEPRECATED.R’
  Running ‘cluster-missing-doFuture-pkg.R’
Running the tests in ‘tests/cluster-missing-doFuture-pkg.R’ failed.
Last 13 lines of output:
  +     print(res)
  +     stopifnot(inherits(res, "FutureError"))
  +   }
  +   
  +   parallel::stopCluster(cl)
  +   cl <- NULL
  +   
  +   plan(sequential)
  +   
  +   message(sprintf("Test set #1 with cluster type %s ... DONE", sQuote(type)))
  + } ## for (type ...)
  Test set #1 with cluster type 'PSOCK' ...
  Error in attr(cl, "withs") && !all(attr(cl, "withouts")) : 
    'length(x) = 3 > 1' in coercion to 'logical(1)'
  Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... NONE
* checking re-building of vignette outputs ... SKIPPED
* DONE
Status: 1 ERROR, 1 NOTE
HenrikBengtsson commented 5 years ago

This comes from:

$ grep -F withouts tests/*.R
tests/cluster-missing-doFuture-pkg.R:                                    withouts = c("doFuture")) {
tests/cluster-missing-doFuture-pkg.R:  ## 'withouts' tops 'withs' for conveniency
tests/cluster-missing-doFuture-pkg.R:  withs <- setdiff(withs, withouts)
tests/cluster-missing-doFuture-pkg.R:  res <- parallel::clusterCall(cl, fun = sapply, X = withouts,
tests/cluster-missing-doFuture-pkg.R:  attr(cl, "withouts") <- res
tests/cluster-missing-doFuture-pkg.R:  cl <- setupClusterWithoutPkgs(type, withouts = c("future", "doFuture"))  
tests/cluster-missing-doFuture-pkg.R:  if (all(attr(cl, "withs") && !all(attr(cl, "withouts")))) {
tests/cluster-missing-doFuture-pkg.R:  if (all(attr(cl, "withs") && !all(attr(cl, "withouts")))) {
HenrikBengtsson commented 5 years ago

This is only a bug in the package tests. It's not a bug in the actual doFuture functionality, so most likely it's not affecting doFuture usage.

HenrikBengtsson commented 5 years ago

Fixed in commit a7b6068e.