Switch from termcolor to anstream#44
Conversation
| threadpool = "1.8.1" | ||
| termcolor = "1.0.5" | ||
| escape8259 = "0.5.2" | ||
| anstream = "0.6.14" |
There was a problem hiding this comment.
Note: this achieves de-duplication for everyone using clap v4.4.6 or later. Earlier clap versions (for MSRV) work, they might just pull in two versions of anstream. That's alright for me, but raises the question of what happens if and when anstream has another semver-breaking release and clap adopts that. This is purely hypothetical at this point, but I think I'd prefer libtest-mimic to follow latest clap as much as feasible. Alternatively, if the breaking changes don't affect the API subset used in libtest-mimic, it could support a range of anstream versions, just like some crates depend on itertools = ">= 0.10, <= 0.12" or similar.
LukasKalbertodt
left a comment
There was a problem hiding this comment.
Sorry for the delay getting back to this, I had lots going on. Thank you for the PR!
All changes look good to me. So yeah, depending on the used clap version, some dependencies might be duplicated, but I don't think we can do anything about that. In the latest version, the dependency tree looks fairly small, without any duplicates, so that's good. Lets just merge and release this. One can still deal with breaking changes of these packages later.
Tested by running the
simpleexample with various flags and environment variables, writing to a tty/pipe/file. I have not tested Windows console support but anstream explicitly supports both legacy wincon and the new ANSI capabilities, and I guess people are exercising that support via clap.I also tested the new MSRV by running these commands (1.64 does not work):
Fix #42