-
Notifications
You must be signed in to change notification settings - Fork 286
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
Provide way to register extra packages for revdep checks #1745
Conversation
Requires r-lib/revdepcheck#352 to work Fixes #1610
|
||
if (is_rstudio_pkg) { | ||
if (length(extra) > 1) { | ||
extra_code <- paste0(deparse(extra), collapse = "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to run this locally to figure out what it did 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it just be deparse(extra)
?
extra <- letters[1:3]
identical(deparse(extra), paste0(deparse(extra), collapse = ""))
#> [1] TRUE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably would be fine here, but it's safer to always collapse into a single string:
extra <- paste0("longpackagename", letters[1:10])
length(deparse(extra))
#> [1] 3
Created on 2023-01-24 with reprex v2.0.2
|
||
test_that("construct correct revdep bullet", { | ||
create_local_package() | ||
env <- env(release_extra_revdeps = function() c("waldo", "testthat")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this would have failed to give the right answer if it returned 1 character string instead of 2 because of that length() > 1
bug 😬
Co-authored-by: Davis Vaughan <[email protected]>
Co-authored-by: Lionel Henry <[email protected]>
#Conflicts: # NEWS.md
|
||
if (is_rstudio_pkg) { | ||
if (length(extra) > 1) { | ||
extra_code <- paste0(deparse(extra), collapse = "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it just be deparse(extra)
?
extra <- letters[1:3]
identical(deparse(extra), paste0(deparse(extra), collapse = ""))
#> [1] TRUE
Requires r-lib/revdepcheck#352 to work
Fixes #1610