Open YaLTeR opened 5 years ago
I would like to work in the clap
-based part, but since this project uses structopt
, i don't think that it's possible to do in the build time.
We can do it, by providing an option in the CLI to print a man page in the runtime, but it will not be clean, and it will add complexity to the code, and an option that user will not use.
Do you think that we first should use clap
directly rather then the structopt
wrapper?
Hm, I really like structopt. :/ Is there really no way, even with the newer clap? They have integrated structopt I think so I would expect there should be some way?
Oh, sorry, I found a way. I should've tried more things.
I faced a problem with the ::clap()
method on the Options
struct, since I didn't include structopt
as a build-dependencies.
I thought that it was because the build script should run before building the tool it self, it couldn't resolve the macros.
We just need to move the Options
struct to another file, so when we include it in the build script we don't need to have all the dependencies.
For now i'm having another problem: expected struct clap::builder::command::App, found struct App
I will try to solve it, but I don't know if it's possible to get a clap::builder::command::App
from structopt
.
They have integrated structopt I think so I would expect there should be some way?
That's great, I will try to work with the latest version.
I didn't work before with the macros part of clap
, but definitely it be better integrated.
Sounds good!
Probably autogenerate for
clap
-based ones and write manually forwl-clip
.