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

Should show_progress() use rlang::is_interactive()? #1356

Closed
DavisVaughan opened this issue Jan 24, 2022 · 1 comment · Fixed by #1360
Closed

Should show_progress() use rlang::is_interactive()? #1356

DavisVaughan opened this issue Jan 24, 2022 · 1 comment · Fixed by #1360
Labels
wip work in progress

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Jan 24, 2022

interactive() && # an interactive session

I naively tried rlang::with_interactive(value = FALSE, {expression-that-calls-read_tsv()}) and was surprised that I still saw the indexing output from vroom. I guess this is because this sets the rlang specific interactive option, which readr/vroom won't recognize.

This should also be thought about in tandem with vroom_progress()
https://github.com/r-lib/vroom/blob/eaab3e161c2d82b922217e7b19a315f7c939af18/R/vroom.R#L237

I know about the progress argument that I could set directly, but this still feels relevant

@jennybc
Copy link
Member

jennybc commented Jan 24, 2022

Yeah, I basically think we should always use rlang::is_interactive() for these purposes.

jennybc added a commit that referenced this issue Jan 26, 2022
@jennybc jennybc added the wip work in progress label Jan 26, 2022
jennybc added a commit that referenced this issue Jan 26, 2022
* Use rlang::is_interactive()

Closes #1356

* Wording

* Add NEWS bullet

* Apparently readr does not import rlang's namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants