Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

methods are not allowed for skipped fields when using multi-line doc comments #245

Closed
DianaNites opened this issue Aug 31, 2019 · 3 comments · Fixed by #246
Closed

methods are not allowed for skipped fields when using multi-line doc comments #245

DianaNites opened this issue Aug 31, 2019 · 3 comments · Fixed by #246
Labels
bug This is a BUG. The fix may be released in a patch version even if considered breaking

Comments

@DianaNites
Copy link

Title. Structopt 0.3.0 errors out with methods are not allowed for skipped fields if skipped fields have doc comments, but only multi-line ones.

Repro:

#[derive(StructOpt)]
struct Example {
    /// This does an internal thing.
    /// Run-on sentence explanation.
    #[structopt(skip)]
    works: String,

    /// This does another internal thing.
    ///
    /// # IMPORTANT NOTE
    #[structopt(skip)]
    fails: String,
}
@TeXitoi TeXitoi added the bug This is a BUG. The fix may be released in a patch version even if considered breaking label Aug 31, 2019
@TeXitoi
Copy link
Owner

TeXitoi commented Aug 31, 2019

Should also exists in 0.2, that's because we generate a long_help when we detect a paragraph.

@CreepySkeleton
Copy link
Collaborator

CreepySkeleton commented Aug 31, 2019

Perhaps we need to completely separate auto-generated stuff from explicitly requested one.

@CreepySkeleton
Copy link
Collaborator

Should also exists in 0.2, that's because we generate a long_help when we detect a paragraph.

Changelog says skip was introduced in 0.3

TeXitoi pushed a commit that referenced this issue Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a BUG. The fix may be released in a patch version even if considered breaking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants