clap v4 support
Opened this issue · 13 comments
As the fine folks of clap have released clap v4, friends and me tried to go ahead and support clapv4 in klask.
Here's the fork: https://github.com/rust-nbg/klask
Doesn't work yet, but we'll be working on it on-and-off. Also I don't know if it would be possible/desirable to support both v3 and v4 somehow.
@barafael any updates on the status of that fork? It would be really useful for me!
For now no progress. First thing will be to remove usage of deprecated clap 3.x.y features, then i will try to port.
Thanks for starting to work on this! I'm going to try and help with moving from v3 to v4 in the near future! I would like to fix a few remaining small issues and publish everything as a new version. This would be the last one that supports clap v3. I don't think supporting both version at once is realistic... :P
Perhaps we should release klask v2 (or v4?!) with clap v4 support and keep v1 alive for a while...
I am quite interested in the clap v4 version. I have a bioinformatics cli app coming and this would give access to many researchers who are unable to use a shell.
Maybe we could do something similar to cansi and split this into modules klask::clap3
, klask::clap4
etc., not sure how problematic this would be. Probably also add a cargo feature for each module.
As the fine folks of clap have released clap v4, friends and me tried to go ahead and support clapv4 in klask.
Here's the fork: https://github.com/rust-nbg/klask
Doesn't work yet, but we'll be working on it on-and-off. Also I don't know if it would be possible/desirable to support both v3 and v4 somehow.
I forked your fork and switched to clap v4. All the tests and examples are passing and it seems to work well with my cli app which has several subcommands. First I wasn't planning on contributing, so I just went ahead and removed some fields from the ArgKind::MultipleStrings
implementation I thought were unnecessary for clap v4, however I am not actually 100% sure if this is the case.
But I hope some of the code can be of use down the line: https://github.com/xosxos/klask
@xosxos just loaded up your fork and it seems to be working well enough! Hard to say for me as my app doesn't seem to really work with klask in general unfortunately. I'm going to submit an issue and see if there's a way to make it work.
@xosxos Just noting: when using this clap 4 fork (awesome btw!) it used to work, but now I get this error message:
error: The platform you're compiling for is not supported by winit
--> /home/rafael/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/mod.rs:67:1
|
67 | compile_error!("The platform you're compiling for is not supported by winit");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@barafael Sorry! I somehow did not realize it was being used. I accidentally broke it last week when updating to egui 0.23.0
and I forgot to fix it straight away! But as far as I know, it should work now.
@xosxos love your work in getting the dependencies updated.
I'm trying to track down a particular oddity on Mac which shows up on egui 0.23
(and 0.24
) but not on the original 0.18
, and I'm hoping you or someone else in the thread might have have an idea. I don't know if this is a klask
thing, an eframe
thing, or even a winit
thing.
When I run an app (--example showcase
will do) it initially launches with NSMenuItem
in the menu bar.
But upon taking it full screen, the name showcase
appears where expected (and remains there afterwards)