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

Make bundlePackages() more robust #922

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Make bundlePackages() more robust #922

merged 1 commit into from
Jul 20, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Jul 20, 2023

This ensures that we work better with both dev renv and with recommended packages that are bundled with R itself.

This ensures that we work better with both dev renv and with recommended packages that are bundled with R itself.
@hadley hadley requested a review from aronatkins July 20, 2023 14:49
deps$description <- lapply(
deps$Package,
package_record,
# Ensure we fall back to system libraries
Copy link
Contributor

Choose a reason for hiding this comment

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

Aside: In an renv project, this is the set of libraries managed by renv.. This would have made yesterday's renv changes unnecessary, as the incoming library within the deploy pane included the two renv paths and my system library.

In other words: When deploying an renv project, the renv::restore run by rsconnect might be unnecessary since the incoming .libPaths() should already have all the dependencies available.

Do you recall why we added the restore?

Copy link
Member Author

Choose a reason for hiding this comment

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

It ensures that we get the DESCRIPTION for the versions declared in your lockfile, rather than the versions you currently have installed in your library.

But maybe we should check renv::status()$sychronised and only restore if that's FALSE? That seems like a nice optimisation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like that optimization can come later. Feels like we can just merge as-is, then.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll make a note.

@aronatkins aronatkins merged commit 18c3ae2 into main Jul 20, 2023
10 checks passed
@aronatkins aronatkins deleted the robust-comparisons branch July 20, 2023 16:11
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