snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

Update clap to 4.0

Open ljedrz opened this issue 3 years ago • 7 comments

Colored help output is currently not supported, but there are plans to work around it.

In addition, run cargo update as a drive-by.

ljedrz avatar Sep 30 '22 08:09 ljedrz

CC https://github.com/AleoHQ/snarkVM/issues/986.

ljedrz avatar Sep 30 '22 09:09 ljedrz

@ljedrz how can we reenable the colored outputs for clap?

setting = clap::AppSettings::ColoredHelp

howardwu avatar Oct 05 '22 00:10 howardwu

Relevant info about Clap 4.* coloring - https://github.com/clap-rs/clap/issues/4132#issuecomment-1253849056

raychu86 avatar Oct 05 '22 00:10 raychu86

Colors seem to have caused some issues and thus were removed for now. I've tried applying them using different clap means, but they didn't work.

ljedrz avatar Oct 05 '22 14:10 ljedrz

Do we know if clap has a timeline for adding support for colors back in?

howardwu avatar Oct 05 '22 18:10 howardwu

AFAIK not yet; however, during my search I stumbled upon an ANSI color feature, which we might be able to use to have colors sooner. I'll look into it.

ljedrz avatar Oct 05 '22 18:10 ljedrz

I did take a look, and it doesn't seem doable with derive. I guess the update can wait to 4.x if we want to keep the help colors.

ljedrz avatar Oct 07 '22 11:10 ljedrz

I'll close this PR for now and wait for 4.x to be released with colors. Thanks @ljedrz for being proactive about this.

howardwu avatar Oct 18 '22 02:10 howardwu