google/argh

`#[argh(description = "...")]` only supports literal

stackinspector opened this issue · 3 comments

#[derive(argh::FromArgs)]
#[argh(description = env!("GIT_HASH"))]
struct Args {}
error: expected literal
 --> arghdesc.rs:2:22
  |
2 | #[argh(description = env!("GIT_HASH"))]
  |                      ^^^

error: #[derive(FromArgs)] type with no description.
       Add a doc comment or an `#[argh(description = "...")]` attribute.
 --> arghdesc.rs:1:10
  |
1 | #[derive(argh::FromArgs)]
  |          ^^^^^^^^^^^^^^
  |
  = note: this error originates in the derive macro `argh::FromArgs` (in Nightly builds, run with -Z macro-backtrace for more info)

error: #[derive(FromArgs)] type with no description.
       Add a doc comment or an `#[argh(description = "...")]` attribute.
 --> arghdesc.rs:3:8
  |
3 | struct Args {}
  |        ^^^^

error: could not compile `snippets` due to 3 previous errors

Addition to support this idea of supporting more than string literal, we have some use cases for it. Based on the configuration features (e.g: feature tdx ) help text can have more details.
More details can be found here.

@erickt @sadmac7000 Hi, we have noticed few commits recently from you. Initially we thought there is no community activity on pull requests or issues addressed from Jan-Aug 2023. We have decided that our issue was not addressed and afraid if this inactivity continues in the future and if our dependency increases on this crate then we will end up with some issues. So we thought of shifting back to clap crate.

Complete details of our issue are here.

Please take a look and let us know your inputs.