Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit snapshot #1636

Merged
merged 7 commits into from
Aug 16, 2023
Merged

Explicit snapshot #1636

merged 7 commits into from
Aug 16, 2023

Conversation

cstepper
Copy link
Contributor

Hi,

we used to use renv::snapshot(type = "explicit") to capture all dependencies stated in the DESCRIPTION file for package development. We put all packages we need for CICD to Suggests, as they are not required for a working package API.
During CICD pipelines, we used renv::restore() for installing all packages we need.

After the recent update to v1.0.0 we basically ran into the same issue as described here:
#1019 (comment)

We don't like the idea of putting all CICD required packages into Imports. Instead, we propose to expose the option to record dev dependencies in the snapshot (and to consider them in checking the project status with renv::status()).

Please have a look. Thanks.

@kevinushey kevinushey requested a review from hadley August 10, 2023 17:58
R/snapshot.R Outdated
@@ -91,6 +91,9 @@ the$auto_snapshot_hash <- TRUE
#' to the currently active package repositories, as retrieved by
#' `getOption("repos")`.
#'
#' @param dev Boolean; should development dependencies be captured
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it also applies to the type all" Regardless, I'd suggest pointing people to the ?dependencies for more details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the link to the dependencies() help into the See Also section for more details about handling R package dependencies. Feel free to modify if you think this should be more prominent in shapshot().

Merge commit '250ea841644012eeda07f5226605037e148d938f'

#Conflicts:
#	DESCRIPTION
#	NEWS.md
Copy link
Collaborator

@kevinushey kevinushey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants