-
Notifications
You must be signed in to change notification settings - Fork 19
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
Upgrade bpaf to 0.7 to remove some turbofishes #92
Conversation
Some result in a slightly better generated code, some make it less likely to explode. Or more readable.
Do you want to update the code to use derive macro? This means compiling syn, but it's already being compiled... |
Thanks! I'll take a look shortly. Re: derive macro: I'm less concerned about compiling |
https://github.com/rosetta-rs/argparse-rosetta-rs according to this other than initial cost to compile |
In that case using the derive API would be great! We already use |
Okay. Gimme a day or two. |
Thanks a lot! |
Pushed, wording might change in some places but cli tests are passing as is so hopefully nothing breaks. Also added a way for users to make cli parser output more colorful a-la clap3/clap4 if they want to. No extra dependencies by default. |
It's a little strange to resolve color as a compilation feature. This is usually runtime configuration - and is disabled by default when writing to something other than a terminal, so that the plain text file doesn't end up littered with terminal escape sequences. See e.g. the behavior of Is there a way to do runtime resolution with |
Runtime detection is present as well and will be used if you enable either colorscheme so redirect to file or running in CI would work as expected. Having it as a compile time helps people to decide if they want any colors at all - I would prefer no colors so won't be enabling this feature, but some people like it. |
My apologies for the delay, I got caught up in RL stuff. I'll try to review and merge this next week. |
No worries, take your time. |
Any thoughts? Also do you want a pull request for |
Thank you for the reminder, I'll try to take a look in the next few days now that I've shipped
I am aware of the correctness issue you mentioned, but it only matters for invalid argument sequences, and rustc itself already does an argument validation pass so we don't have to. |
Looks good to me! I'm going to merge this and cut a release. Thanks a lot! I'm going to make the stylistic choice of bright colors, and drop the feature. I think that's the option that's easiest to skim, and the colors chosen are readable on both light and dark backgrounds. Handling of piping also looks correct to me. |
There's no downside to leaving the feature in even if you go with the bright colors by default, for example I would prefer not having color at all compared to the bright option. Visibility depends on only on background being dark or bright, but also on a palette. |
Also if you really want to drop the color selection - you need to update the docs. |
Actually, I'll have to disable color for now because it pulls in |
Bummer. I'm not using it directly but through owo-colors. Do you know of
any working/maintained alternative?
…On Fri, Nov 4, 2022, 16:17 Shnatsel ***@***.***> wrote:
Actually, I'll have to disable color for now because it pulls in atty,
which has known UB and appears to be unmaintained: softprops/atty#50
<softprops/atty#50>
—
Reply to this email directly, view it on GitHub
<#92 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQFI4FVEXKX3BPLYHOTBLWGVVN3ANCNFSM6AAAAAARCOA2OM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No, but I haven't really looked. You could always just fork it and we can encourage people to switch via the RustSec advisory for example: rustsec/advisory-db#1457 |
I've shipped v0.3.2 - without color, but it does update to I'd be happy to add color later because I think it meaningfully improves the readability of the help text. |
I'll see what I can do about |
I did this for now FWIW zkat/supports-color#9 |
supports-color pull request got merged, hopefully a release soon. |
Plus various code improvements, feel free to drop some or all of them.