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

Consideration to put num_ansi_colors in an independent upstream package #747

Open
MichaelChirico opened this issue Jan 17, 2025 · 1 comment

Comments

@MichaelChirico
Copy link
Contributor

num_ansi_colors() really is a wonderful piece of logic. I think other packages working with command-line interfaces would benefit from it without needing to depend on {cli}.

This came up as a suggestion here:

markvanderloo/tinytest#90

WDYT, is that worthwhile to pursue?

@MichaelChirico MichaelChirico changed the title Consideration to put num_ansi_colors in an upstream package Consideration to put num_ansi_colors in an independent upstream package Jan 17, 2025
@gaborcsardi
Copy link
Member

This would indeed make sense in an ideal situation, but when it comes to (R) packaging in practice, the situation is not exactly ideal.

I guess the question is mostly academic for the tinytest package, I cannot imagine that they would add a new dependency, however small.

In any case, the crayon package is pretty close to what that new package would be. crayon copies the same logic as cli, and it is pretty small and lightweight, has no C code. It is superseded, so it'll never really change (except for num_ansi_colors() updates!), and will stay around forever.

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