-
Notifications
You must be signed in to change notification settings - Fork 0
--help message randomly show and hide docs lines #232
Comments
Comment by marcospb19 Sent here by @epage, issue happened in this piece of code in one of my projects. |
Comment by epage
Which empty comment? |
Comment by marcospb19 (first step) // Ouch commands:
// - `compress`
// - `decompress`
// - `list`
//
// Clap commands:
// - `help`
/// Repository: https://github.com/ouch-org/ouch (second step) /// Ouch commands:
/// - `compress`
/// - `decompress`
/// - `list`
///
/// Clap commands:
/// - `help`
/// Repository: https://github.com/ouch-org/ouch @epage then you delete that "///" blank line at the middle, leaving this: (third step) /// Ouch commands:
/// - `compress`
/// - `decompress`
/// - `list`
/// Clap commands:
/// - `help`
/// Repository: https://github.com/ouch-org/ouch Sorry for the confusion, this bug has too many steps to reproduce, maybe I even reported more than one bug at the same time. |
Comment by epage Ok, let's break down all of the parts
Ok, I think I covered it all The challenge is in solutions because we can't introspect across items
|
Comment by epage Looks like if we always set
This might be a good enough workaround until we can get a better solution. |
Issue by marcospb19
Tuesday Nov 02, 2021 at 17:37 GMT
Originally opened as clap-rs/clap#2983
Please complete the following tasks
Rust Version
rustc 1.58.0-nightly (e249ce6b2 2021-10-30)
Clap Version
3.0.0-beta.5
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo run -q -- --help
Actual Behaviour
This is a tricky one, if you copy my code example, here is the --help message:
So, that
Repository
line does not appear in the help message 👎, but if we change all the//
comments to be///
(to three slashes):Now it appears!! 👍.
Now try deleting the empty comment
"///\n"
. Does not appear anymore 👎.Now you delete the
#[clap(version, about)]
line. Appears again 👍.So, we went 👎 -> 👍 -> 👎 -> 👍 just by making small random changes.
Expected Behaviour
I assume it should be consistent and always show that repository line.
Additional Context
No response
Debug Output
With the starter code:
The text was updated successfully, but these errors were encountered: