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

Move termcolor to separate repository? #924

Closed
LPGhatguy opened this issue May 21, 2018 · 5 comments
Closed

Move termcolor to separate repository? #924

LPGhatguy opened this issue May 21, 2018 · 5 comments
Labels
question An issue that is lacking clarity on one or more points.

Comments

@LPGhatguy
Copy link
Contributor

Termcolor is the coloring crate used by Cargo (since June, 2017), which indicates to me that it should be or become the default recommended terminal coloring crate for Rust. Termcolor also handles Windows the most robustly out of all of the terminal coloring crates available.

For discoverability, should termcolor move to a separate repository?

  • Filing issues and PRs for termcolor specifically feels out-of-place in a large project like ripgrep
  • It's not clear whether termcolor is intended to be used by other projects when it lives as a sub-folder
  • It's hard to keep up with issues filed against termcolor when they're a tiny subset of ripgrep's
    • ie. GitHub's "Watch" feature would blow up my inbox
@BurntSushi
Copy link
Owner

which indicates to me that it should be or become the default recommended terminal coloring crate for Rust.

It might, but termcolor's API is quite inconvenient compared to other terminal coloring APIs, and this is mostly because it handles Windows console coloring correctly, which is necessary for pre-Windows 10 support. If you only care about supporting Windows 10 or newer, then you have a lot more choices.

For discoverability, should termcolor move to a separate repository?

Not sure. The issue volume for termcolor is quite low. The reason why it (and the other crates) are in the ripgrep repo is because it simplifies maintenance for me, which I attach a lot of value to.

I'm not sure that there's too much else left to do for termcolor anyway. It will never grow beyond very basic color/styling support. It's probably ripe for a 1.0 release.

@BurntSushi BurntSushi added the question An issue that is lacking clarity on one or more points. label May 21, 2018
@gilescope
Copy link

I was using ripgrep on the default powershell terminal which has a blue background. The red with blue doesn't work well. It got me thinking that term colors for error / warning / good probably don't work well for some colorblind users. It would be pretty cool if we could somehow support colorblind cli tools out of the box. Anyway maybe this is an argument for terminal coloring being separated so functionality like that can be solved in one place?

@BurntSushi
Copy link
Owner

@gilescope Huh? termcolor is already a separate crate. It's just in this repo. Please see the ripgrep documentation on how to change the colors.

This issue should be about process and maintenance. Specific features are entirely orthogonal.

@gilescope
Copy link

Good point. And the more I think of color blindness support, the more I think its better solved once at the OS level like iOS/Android do.

BurntSushi added a commit that referenced this issue Jul 17, 2018
We also move wincolor with it.

Fixes #924
@BurntSushi
Copy link
Owner

I've moved termcolor to its own repository: https://github.com/BurntSushi/termcolor

My intent is to release 1.0 imminently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question An issue that is lacking clarity on one or more points.
Projects
None yet
Development

No branches or pull requests

3 participants