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

Return 0 version for non-existing dependency package #152

Closed
wants to merge 2 commits into from
Closed

Return 0 version for non-existing dependency package #152

wants to merge 2 commits into from

Conversation

PoGibas
Copy link

@PoGibas PoGibas commented Aug 26, 2018

If any of the dependency packages is removed (tidyverse_deps(TRUE) or tidyverse_update(TRUE)) would fail. This happens because utils::packageVersion returns error (NA result from packageDescription).

To fix this issue we can check if dependency is within installed.packages() and if not return 0 so that comparison between package version with CRAN would work.

Example:

utils::remove.packages("selectr")
tidyverse::tidyverse_deps() # works
tidyverse::tidyverse_deps(TRUE) # returns: Error in FUN(X[[i]], ...) : package ‘selectr’ not found

PS. This would not happen if any of tidyverse packages is missing as the library(tidyverse) wouldn't work.

If dependency package is not installed utils::packageVersion will return error. Check if package is in installed.packages first.
@MikeJohnPage
Copy link

I have come across the same problem:

tidyverse::tidyverse_deps(recursive = TRUE)
#> Error in FUN(X[[i]], ...): package 'ellipsis' not found

@hadley hadley closed this in b871a39 May 10, 2019
@hadley
Copy link
Member

hadley commented May 10, 2019

Thanks @PoGibas - I ended up taking a slightly different route.

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