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

be verbose if we're going to prompt #1615

Merged
merged 3 commits into from
Jul 28, 2023
Merged

Conversation

kevinushey
Copy link
Collaborator

Since the output we display might be controlled by renv.verbose.

Copy link
Contributor

@aronatkins aronatkins left a comment

Choose a reason for hiding this comment

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

Should the documentation for any of the prompt arguments or the renv.verbose option discuss their interactions?

@kevinushey
Copy link
Collaborator Author

Hmm... we don't actually document the use of renv.verbose anywhere. Maybe it deserves a mention in a vignette?

Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

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

Agree that it would be good to document this somewhere, but it's not clear where.

R/scope.R Outdated
Comment on lines 393 to 400
renv_scope_verbose_if <- function(value) {
if (value) {
renv_scope_options(
renv.verbose = value,
scope = parent.frame()
)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
renv_scope_verbose_if <- function(value) {
if (value) {
renv_scope_options(
renv.verbose = value,
scope = parent.frame()
)
}
}
renv_scope_verbose_if <- function(value, scope = parent.frame()) {
if (value) {
renv_scope_options(
renv.verbose = TRUE,
scope = scope
)
}
}

value -> TRUE makes the logic a bit clearer IMO and I think it's good practice to always have a scope argument.

@kevinushey kevinushey merged commit 98e3420 into main Jul 28, 2023
12 checks passed
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