-
Notifications
You must be signed in to change notification settings - Fork 154
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
notify user if directory contains lots of files on load #1603
Conversation
"" | ||
) | ||
|
||
renv_scope_options(renv.verbose = 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.
I wonder if this suggests that the writef()
should actually be a warning?
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 feel like we need something like ewritef()
, or some other version of writef()
that ignores renv.verbose
.
@@ -932,15 +941,26 @@ renv_snapshot_dependencies_impl <- function(project, type = NULL, dev = FALSE) { | |||
if (elapsed < limit) | |||
return() | |||
|
|||
renv_scope_options(renv.verbose = 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.
Duplicated below
@@ -391,6 +391,9 @@ renv_dependencies_find_dir <- function(path, root, depth) { | |||
# list children | |||
children <- renv_dependencies_find_dir_children(path, root, depth) | |||
|
|||
# notify about number of children | |||
renv_condition_signal("renv.dependencies.count", list(path = path, count = length(children))) |
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.
Is this used anywhere?
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.
Yes, see https://github.com/rstudio/renv/pull/1603/files#diff-5d849f3782ddfdd6b0053b841b4be729f4fdaa33c9262caf6757aa185e5f5658R927-R929, which fills in the count
variable, and https://github.com/rstudio/renv/pull/1603/files#diff-5d849f3782ddfdd6b0053b841b4be729f4fdaa33c9262caf6757aa185e5f5658R946-R948 where we use it.
|
||
# try to collect snapshot dependencies | ||
renv_scope_options(renv.dependencies.elapsed_time_threshold = 0) | ||
expect_snapshot(. <- renv_snapshot_dependencies(project)) |
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.
If we stick with the writef()
, I'd suggest adding a renv_scope_options(renv.verbose = FALSE)
to assert that the warning is displayed even when not verbose.
I'm going to merge this and consider your comments as follow-up for #1607. |
Closes #1573.