rdatsci / rtcl

R tools for the command line
65 stars 3 forks source link

rbuild: Error #28

Closed surmann closed 6 years ago

surmann commented 6 years ago

I tried rbuild on different packages with the same error:

> rt::rbuild()
Updating documentation for 'packageName'
Updating packageName documentation
Loading packageName
Building package 'packageName' ...
Error in file.info(x) : invalid filename argument
> traceback()
6: file.info(x)
5: is_dir(path)
4: build_setup(path, dest_path, binary, vignettes, manual, args, 
       needs_compilation, compile_attributes)
3: pkgbuild::build(path = path, dest_path = dest_path, binary = binary, 
       vignettes = vignettes, manual = manual, args = args, quiet = quiet, 
       ...)
2: devtools::build(pkg)
1: rt::rbuild()

devtools::build() works. Any hints to solve this bug?

surmann commented 6 years ago

The current CRAN version uses the call devtools::build(pkg = ".", path = NULL, ...) to build a package. The current version on GitHub uses devtools::build(path = ".", ...) and hand it over to the non-CRAN package pkgbuild::build. They skipped the variable pkg.

Hence, in the future it will not be possible to do some package handling before calling devtools::build. I propose to clean this method and use the path directly via devtools::build(path = pathfromrbuild). This will work with all versions of devtools.

@mllg What do you think?

@jakob-r Thanks for your support to dig into this error.

surmann commented 6 years ago

Resolved with bacdb24