Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Suggests:
Enhances: BiocInstaller
URL: https://github.com/rstudio/packrat/
BugReports: https://github.com/rstudio/packrat/issues
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
3 changes: 2 additions & 1 deletion R/aaa-globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ new_defaults = function(value = list()) {
## These should be set on entering, exiting packrat mode
.packrat_mutables <- new_defaults(list(
origLibPaths = NULL,
project = NULL
project = NULL,
snapshot.recursive.dependency = FALSE
))
3 changes: 2 additions & 1 deletion R/hooks.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ buildSnapshotHookCall <- function(project, debug = FALSE) {
snapshotArgs <- paste(sep = ", ",
peq("project", surround(project, with = "'")),
peq("auto.snapshot", "TRUE"),
peq("verbose", "FALSE")
peq("verbose", "FALSE"),
peq("snapshot.recursive.dependency", get_opts("snapshot.recursive.dependency"))
)

repos <- gsub("\"", "'", paste(deparse(getOption('repos'), width.cutoff = 500), collapse = ' '))
Expand Down
8 changes: 6 additions & 2 deletions R/options.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ VALID_OPTIONS <- list(
snapshot.recommended.packages = list(TRUE, FALSE),
snapshot.fields = function(x) {
is.null(x) || is.character(x)
}
},
snapshot.recursive.dependency = list(TRUE, FALSE)
)

default_opts <- function() {
Expand All @@ -38,7 +39,8 @@ default_opts <- function() {
ignored.packages = NULL,
quiet.package.installation = TRUE,
snapshot.recommended.packages = FALSE,
snapshot.fields = c("Imports", "Depends", "LinkingTo")
snapshot.fields = c("Imports", "Depends", "LinkingTo"),
snapshot.recursive.dependency = FALSE
)
}

Expand Down Expand Up @@ -105,6 +107,8 @@ initOptions <- function(project = NULL, options = default_opts()) {
##' What fields of a package's DESCRIPTION file should be used when discovering
##' dependencies?
##' (character, defaults to \code{c("Imports", "Depends", "LinkingTo")})
##' \item \code{snapshot.recursive.dependency}:
##' Make a recursive dependency search when doing a snapshot
##' }
##'
##' @param options A character vector of valid option names.
Expand Down
7 changes: 5 additions & 2 deletions R/snapshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ snapshot <- function(project = NULL,
#' dependency of this project, if not otherwise discovered? This should be
#' \code{FALSE} only if you can guarantee that \code{packrat} will be available
#' via other means when attempting to load this project.
#' @param snapshot.recursive.dependency Perform a recursive dependency search,
#' to complete the "Require" field in the packrat.lock file
#' @keywords internal
#' @rdname snapshotImpl
#' @export
Expand All @@ -115,7 +117,8 @@ snapshot <- function(project = NULL,
verbose = TRUE,
fallback.ok = FALSE,
snapshot.sources = TRUE,
implicit.packrat.dependency = TRUE) {
implicit.packrat.dependency = TRUE,
snapshot.recursive.dependency = get_opts("snapshot.recursive.dependency")) {

if (is.null(available))
{
Expand Down Expand Up @@ -169,7 +172,7 @@ snapshot <- function(project = NULL,
project = project,
available = available,
lib.loc = lib.loc,
recursive = FALSE)
recursive = snapshot.recursive.dependency)

# For inferred packages (ie. packages within the code), we try to construct
# records first from the lockfile, and then from other sources if possible
Expand Down
1 change: 0 additions & 1 deletion man/appDependencies.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/bundle.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/clean.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/disable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/init.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/install.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/install_local.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/migrate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/packify.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/packrat-external.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/packrat-mode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions man/packrat-options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/packrat-resources.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/packrat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/repos_create.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/repos_upload.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions man/repository-management.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/restore.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/search_path.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/snapshot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/snapshotImpl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/status.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/unbundle.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/unused_packages.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.