Skip to content

Instantly share code, notes, and snippets.

@hadley
Created August 22, 2012 20:51
Show Gist options
  • Save hadley/3429247 to your computer and use it in GitHub Desktop.
Save hadley/3429247 to your computer and use it in GitHub Desktop.
> test_package("devtools")
Dependencies : .............
Documentation checks : ...
Compiled DLLs : Error in file(filename, "r", encoding = encoding) :
cannot open the connection
Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file 'startup.Rs': No such file or directory
Execution halted
1Error in file(filename, "r", encoding = encoding) :
cannot open the connection
Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file 'startup.Rs': No such file or directory
Execution halted
2
Imports : .....
Load: collate : ......
Load hooks : ...............................
Metadata : .................
Namespace : ...........................3.
Vignettes : ...
1. Error: unload() unloads DLLs from packages loaded with library() ------------
Command failed (1)
1: install("dll-unload")
2: build(pkg, tempdir())
3: R(cmd, path)
4: in_dir(path, system_check(r_path, options, env, ...))
5: force(code)
6: system_check(r_path, options, env, ...)
7: stop("Command failed (", res, ")", call. = FALSE)
2. Error: load_all() compiles and loads DLLs -----------------------------------
Command failed (1)
1: load_all("dll-unload", reset = TRUE)
2: compile_dll(pkg)
3: R(paste("CMD SHLIB", "-o", basename(dll_name(pkg)), srcfiles), path = srcdir)
4: in_dir(path, system_check(r_path, options, env, ...))
5: force(code)
6: system_check(r_path, options, env, ...)
7: stop("Command failed (", res, ")", call. = FALSE)
3. Failure: Environments have the correct attributes ---------------------------
wd is not identical to attr(pkgenv, "path"). Differences:
1 string mismatch
Error: Test failures
In addition: Warning message:
In normalizePath(devtest("namespace")) :
path[1]="": No such file or directory
Execution halted
@yoni
Copy link

yoni commented Sep 4, 2012

Hello Hadley,

I'm running into a similar error when building my new rbundler package. This gist is the only Google result I could find for this specific error.I know it's a shot in the dark, but I'm curious if you found the root cause to the issue you're seeing here.

> library(testthat)
> library(devtools)
> 
> test_package("rbundler")
A developer can bundle all a package and it's dependencies. : Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
Calls: local ... eval.parent -> eval -> eval -> eval -> eval -> source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'startup.Rs': No such file or directory

The error seems to rear it's head when I run devtools check, but not when I run testthat's test_package function directly. I opened the following issue under rbundler to track this: https://github.com/opower/rbundler/issues/2

Thanks,
Yoni

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment