diff --git a/DESCRIPTION b/DESCRIPTION index de0725c..800f818 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: checked Title: Systematically Run R CMD Checks -Version: 0.5.4 +Version: 0.5.5 Authors@R: c( person( diff --git a/NEWS.md b/NEWS.md index 7534ead..dfe7132 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# checked 0.5.5 + +* Add 'install_opts_to_inherit' option which can be used to specify parameters + that install subprocess should inherit from the main process + # checked 0.5.4 * Improve error messaging when using basic_tty diff --git a/R/install.R b/R/install.R index 93adbae..2f697af 100644 --- a/R/install.R +++ b/R/install.R @@ -11,19 +11,15 @@ install_process <- R6::R6Class( ..., lib = .libPaths()[[1]], libpaths = .libPaths(), - available_packages_filters = getOption("available_packages_filters"), log = NULL, - env = callr::rcmd_safe_env() + env = options::opt("install_envvars") ) { if (!dir.exists(lib)) dir.create(lib, recursive = TRUE) private$package <- pkgs self$log <- log private$callr_r_bg( - function(..., available_packages_filters) { - options( - timeout = 600, - available_packages_filters = available_packages_filters - ) + function(..., opts_to_inherit) { + do.call(options, opts_to_inherit) invisible(capture.output(withCallingHandlers( utils::install.packages(..., quiet = FALSE, verbose = TRUE), warning = function(w) { @@ -35,7 +31,9 @@ install_process <- R6::R6Class( private$package, ..., lib = lib, - available_packages_filters = available_packages_filters + opts_to_inherit = do.call( + options, options::opt("install_opts_to_inherit") + ) ), libpath = libpaths, stdout = self$log, diff --git a/R/options.R b/R/options.R index a81f764..4ab78fd 100644 --- a/R/options.R +++ b/R/options.R @@ -79,7 +79,16 @@ options::define_options( "value used as `user_profile` parameter passed to the `callr::r_bg()` function used to install packages", - install_user_profile = "project" + install_user_profile = "project", + + "`list` of characters which specifies names of the R session options that + should be inherited by the install subprocesses, from the main process ", + install_opts_to_inherit = list( + "timeout", + "available_packages_filters", + "HTTPUserAgent", + "pkgType" + ) ) #' @eval options::as_roxygen_docs() diff --git a/cran-comments.md b/cran-comments.md deleted file mode 100644 index 8056835..0000000 --- a/cran-comments.md +++ /dev/null @@ -1,2 +0,0 @@ -Few minor updates to to exported functions and CRAN results failure address. -Reduced the runtime of tests on CRAN \ No newline at end of file diff --git a/man/options.Rd b/man/options.Rd index 71c9de2..34780cc 100644 --- a/man/options.Rd +++ b/man/options.Rd @@ -120,6 +120,14 @@ function used to install packages\item{default: }{\preformatted{"project"}} \item{envvar: }{R_CHECKED_INSTALL_USER_PROFILE (evaluated if possible, raw string otherwise)} }} +\item{install_opts_to_inherit}{\describe{ +\code{list} of characters which specifies names of the R session options that +should be inherited by the install subprocesses, from the main process\item{default: }{\preformatted{list("timeout", "available_packages_filters", "HTTPUserAgent", + "pkgType")}} +\item{option: }{checked.install_opts_to_inherit} +\item{envvar: }{R_CHECKED_INSTALL_OPTS_TO_INHERIT (evaluated if possible, raw string otherwise)} +}} + } } diff --git a/man/options_params.Rd b/man/options_params.Rd index 4402e65..963eb30 100644 --- a/man/options_params.Rd +++ b/man/options_params.Rd @@ -36,6 +36,9 @@ constrocuting a plan \code{task_grap} (Defaults to \code{TRUE}, overwritable usi \item{check_envvars}{named \code{character} vector of environment variables to use during the R CMD check. (Defaults to \verb{c(}\emph{R_CHECK_FORCE_SUGGESTS}\verb{= "false",}\emph{R_CHECK_RD_XREFS}\verb{= "false", ; }\emph{R_CHECK_SYSTEM_CLOCK}\verb{= "false",}\emph{R_CHECK_SUGGESTS_ONLY}\verb{= "true", ; }\emph{R_CHECK_CRAN_INCOMING}\verb{ = "false")}, overwritable using option 'checked.check_envvars' or environment variable 'R_CHECKED_CHECK_ENVVARS')} +\item{install_opts_to_inherit}{\code{list} of characters which specifies names of the R session options that +should be inherited by the install subprocesses, from the main process (Defaults to \verb{list("timeout", "available_packages_filters", "HTTPUserAgent", ; "pkgType")}, overwritable using option 'checked.install_opts_to_inherit' or environment variable 'R_CHECKED_INSTALL_OPTS_TO_INHERIT')} + \item{tty_tick_interval}{tty refresh interval when reporting results in milliseconds (Defaults to \code{0.1}, overwritable using option 'checked.tty_tick_interval' or environment variable 'R_CHECKED_TTY_TICK_INTERVAL')} \item{check_build_args}{\code{character} vector of args passed to the R CMD build. (Defaults to \code{c("--no-build-vignettes", "--no-manual")}, overwritable using option 'checked.check_build_args' or environment variable 'R_CHECKED_CHECK_BUILD_ARGS')}