-
Notifications
You must be signed in to change notification settings - Fork 129
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
Only suggest cli/crayon/fansi #475
Comments
Would that new package print a startup message when the suggested packages are not available? Otherwise we might have a tough time debugging problems caused by the parallel code paths. |
The parallel code path would do nothing, so I don't think debugging would be hard. |
I'm not sure. Example: word wrapping. If fansi is available, we use fallback_strwrap <- function(...) {
if (color_available()) {
fansi::strwrap_ctl(...)
} else {
strwrap()
}
} Perhaps I don't understand what the new package is supposed to handle. |
Right - if we're not using colour we don't need special handling for wrapping strings. The goal is to provide a single package that we can import whenever we want to use colour, but does not import any packages in turn. |
Minimize cli imports first (convert to Suggests). |
Then, cli could be used as proxy/shim package. |
The wrapper interface should use
Model after |
We can't remove fansi yet, only after really removing |
- cli and crayon are now suggested packages (#475).
(Would also need to do the same in pillar)
These are moderately heavy dependencies so it would be nice to make them optional.
I would be cautiously in favour of creating a new package that we could import that suggested cli/crayon/fansi but if weren't available provided a base fallback (i.e. no colour). If you wanted to go that route, I think the best place to start would be a review of all the cli/crayon/fansi functionality currently used in tibble + pillar.
The text was updated successfully, but these errors were encountered: