-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix!: Make color settings an enum #2851
Conversation
8283a0b
to
8fbed8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime support for Never is needed.
fce9d21
to
6062970
Compare
@epage Can you look at the API? I will add docs if good. |
Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a rough pass at title / summary just to avoid it falling through the cracks. Feel free to correct anything and have bors kick things off.
bors r+ |
Build failed: |
bors retry |
🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
Build succeeded: |
In clap-rs#2851, we moved color from an AppSetting to function (with some tweaks in clap-rs#2907). When doing this, we documented `App::color` to be equivelant of `App::global_settings(Color...)` but never actually propogated it. We are now propogating it. A test is added to ensure that no matter how we store the color choice, we continue to propogate it. This required exposing `App::get_color`.
In clap-rs#2851, we moved color from an AppSetting to function (with some tweaks in clap-rs#2907). When doing this, we documented `App::color` to be equivalent of `App::global_settings(Color...)` but never actually propagated it. We are now propagating it. A test is added to ensure that no matter how we store the color choice, we continue to propagate it. This required exposing `App::get_color`.
This switches us from individual
AppSettings
for each state to an enumWe did not provide yaml support, assuming this is more of a runtime decision while yaml is more static.
Fixes #2811