concolor icon indicating copy to clipboard operation
concolor copied to clipboard

Deprecate concolor

Open epage opened this issue 2 years ago • 2 comments
trafficstars

concolor was intended as a way to be aware of the exact color situation for either stdout or stderr anywhere in an application, whether from environment detection or the command-line.

Through the time I've been using concolor, I've been feeling like this direction is a mistake. We instead need to be encouraging decoupling of rendering code from color control. To this end, I've created anstream which has been used in clap now for about three months.

For applications where anstream doesn't work, I feel like users would be better off composing what they need out of colorchoice, colorchoice-clap, and your choice of environment detection crates including anstyle-query and supports-color.

As I feel like both of these are a better route and that should cover all users, I don't see how concolor fits into the CLI story anymore and propose we deprecate it.

If nothing comes up before then, we'll likely archive the repo in about a month

epage avatar Jun 08 '23 14:06 epage

Thanks @epage. We're happy to take your direction. We're mostly consumers of colors through Ariadne so would likely follow what @zesterer does.

(I coincidentally looked at how we were handling colors in https://github.com/PRQL/prql/pull/2755 & https://github.com/zesterer/ariadne/issues/79; possibly this displaces those)

max-sixty avatar Jun 08 '23 21:06 max-sixty

We've now removed concolor is favor of anstream & colorchoice-clap https://github.com/PRQL/prql/pull/2773

max-sixty avatar Jun 09 '23 21:06 max-sixty