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

Spinner is messing up devtools::check() output #23

Closed
jimhester opened this issue Apr 12, 2017 · 7 comments
Closed

Spinner is messing up devtools::check() output #23

jimhester opened this issue Apr 12, 2017 · 7 comments

Comments

@jimhester
Copy link
Member

E.g.

 OKhecking for file ‘devtools/DESCRIPTION’ ...

I can't figure out a good way to get back to the end of the previous line using ANSII escape codes to fix this, maybe you have some ideas.

@gaborcsardi
Copy link
Member

There are ANSI sequences for this, but they are not very useful in this case, because \r is the only thing that works everywhere (Rgui, R.app, RStudio).

We'll figure out sg. We can always disable the spinner.

@jimhester
Copy link
Member Author

It would be fine if \b would backspace over newlines like it does in most languages, but it does not :-/

@gaborcsardi
Copy link
Member

I think you can just turn the spinner off for now. Is that OK?

@jimhester
Copy link
Member Author

I don't really mind the messed up output, but it would be nice to have a general solution to this problem and I am not sure one exists with how the escape codes are currently handled by the R console.

@gaborcsardi
Copy link
Member

AFAIK Rgui, R.app and RStudio only handle \r, so there is no good solution, apart from building a UI around this. I.e. leaving some space there for the spinner, and re-printing the line before a \n.

@gaborcsardi
Copy link
Member

I can also turn off the spinner by default.

@gaborcsardi
Copy link
Member

I think devtools::check could just call callr with spinner = FALSE. Here: https://github.com/hadley/devtools/blob/ab176e699cef187feb5343a1b09c98b34a07db82/R/check.r#L169

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

No branches or pull requests

2 participants