sbg / sevenbridges-r

Seven Bridges API Client, CWL Schema, Meta Schema, and SDK Helper in R
https://sbg.github.io/sevenbridges-r/
Apache License 2.0
35 stars 14 forks source link

do.call(docker, x) : second argument must be a list #65

Closed nanxstats closed 6 years ago

nanxstats commented 6 years ago

There are some issues for using do.call in R 3.5.0 and devel branch of bioc (as of April 14, 2018) that caused devel branch build to fail. To reproduce:

> library("sevenbridges")
> requirements(docker(pull = "rocker/r-base"))

It gives

Error in do.call(docker, x) : second argument must be a list 
5. stop("second argument must be a list") 
4. do.call(docker, x) at class-cwl.R#2677
3. FUN(X[[i]], ...) 
2. lapply(listData[!idx.fd], function(x) {
    if ("class" %in% names(x)) {
        cls <- x$class
        switch(cls, DockerRequirement = { ... at class-cwl.R#2671
1. requirements(docker(pull = "rocker/r-base")) 

which should give

[[1]]
class: DockerRequirement
dockerPull: rocker/r-base

As a workaround to pass the build/check, I've commented out all hints = requirements(...) in https://github.com/sbg/sevenbridges-r/commit/d40b22f2b5710d620a4e66bfec7b1011def814f7.

To fix this:

  1. Fix the issue in requirements(), most likely happened in its do.call() statements (x is not a list and cannot be used as args now, not sure why it could be used before).
  2. Restore all commented code blocks in commit https://github.com/sbg/sevenbridges-r/commit/d40b22f2b5710d620a4e66bfec7b1011def814f7.
nanxstats commented 6 years ago

Solved by https://github.com/sbg/sevenbridges-r/commit/6371faaba2d059af914f2f607308752db3bdf1d4 and https://github.com/sbg/sevenbridges-r/commit/7ec80ffd2beb5efe07d8eee9a563ddd52451541e.