callr now supports starting an R process with a different architecture, so on Windows 64-bit R can start a 32-bit R background process, and vice-versa (#95).
r_sessionnow exits if the load hook errors. This generates an error if the session is started with
wait = TRUE. For
wait = FALSEthe first
$read()operation will return with an error (#162).
All callr functions and background processes properly clean up temporary files now (#104).
callr now uses a more principled setup for the library path, and restores the related environment variables in the child process. This is a breaking change if you relied on having the library set in a
system() subprocess of the callr subprocess (#114).
Better printing of
rlang_errors that happened in the subprocess.
The stacking of error objects is slightly different now, as we keep the unmodified error from the subprocess in
callr now loads
.Rprofile files from the current working directory by default. This works better with packrat, renv, and other software that relies on a local profile for initialization (#131).
r_session now avoids creating
env objects in the global environment of the subprocess.
$debug() method for
r_session to inspect the dumped frames in the subprocess, after an error.
callr now sets the
.Last.error variable for every uncaught callr error to the error condition, and also sets
.Last.error.trace to its stack trace. If the error originates in the subprocess, then
.Last.error is a hierarchical error object, and
.Last.error.trace merges the traces from the two processes. See the
README.md for an example.
$traceback() method for
r_session, to run
traceback() in the subprocess, after an error.
A callr subprocess now does not load any R packages by default.
New vignette, that showcases
rscript() can now redirect the standard error of the subprocess its standard output. This allows to keep them correctly interleaved. For this, you need to either set the
stderr argument to the special string
"2>&1", or to the same output file as specified for
rscript() now pass
... arguments to
... arguments to the
processx::process constructor. For
rscript_process extra arguments can be specified as
options$extra, these are also passed to the
processx::process constructor (#100).
Better default for the
repos option in callr subprocesses. callr no longer creates duplicate “CRAN” entries. By default the new
default_repos() function is used to set
repos in the subprocess.
r_session$run_with_output() now returns an S3 object with class
r_session$run*() handle interrupts properly. It tries to interrupt the background process fist, kills it if it is not interruptible, and then re-throws the interrupt condition, going back to the top level prompt if the re-thrown condition is uncaught.
callr now handles the case when the subprocess calls
callr now uses the processx package, instead of embedded code, to create and control processes.
Fix a bug with R-devel, caused by the change on 2018-02-08: https://github.com/wch/r-source/commit/924582943706100e88a11d6bb0585d25779c91f5
Fix a race condition on Windows, when creating named pipes for
stderr. The client sometimes didn’t wait for the server, and callr failed with ERROR_PIPE_BUSY (231, All pipe instances are busy).
Support block callbacks, in addition to line callbacks. Block callbacks are called for arbitrary chunks of output, even without a newline
Support timeouts, via the
Fix bug when
stderr are redirected to the same file
rcmd_safe_env() to allow extending the environment variables set in safe mode
rcmd() gets a
rcmd() gets a
wd argument to set the working directory