Skip to content

Commit

Permalink
Remove workarounds for TeXitoi/structopt#333
Browse files Browse the repository at this point in the history
Summary: This workaround seems to be unnecessary since we migrated to newer clap.

Reviewed By: stepancheg

Differential Revision: D37334350

fbshipit-source-id: 3b5c116ec492ea8e6be2fe61cbdd975a115573ba
  • Loading branch information
cjhopman authored and facebook-github-bot committed Jun 22, 2022
1 parent 3a11966 commit 7ca535d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 45 deletions.
40 changes: 4 additions & 36 deletions cli/src/commands/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,7 @@ pub(crate) enum HostPlatformOverride {
Windows,
}

// Workaround to have rustdoc that doesn't override cli help docs.
// See https://github.com/TeXitoi/structopt/issues/333
#[cfg_attr(not(doc), allow(missing_docs))]
#[cfg_attr(
doc,
doc = r#"
Defines options related to event logs. Any command that involves a streaming daemon command should include these options.
"#
)]
/// Defines options related to event logs. Any command that involves a streaming daemon command should include these options.
#[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)]
pub(crate) struct CommonEventLogOptions {
/// Write events to this log file
Expand All @@ -123,15 +115,7 @@ impl CommonEventLogOptions {
}
}

// Workaround to have rustdoc that doesn't override cli help docs.
// See https://github.com/TeXitoi/structopt/issues/333
#[cfg_attr(not(doc), allow(missing_docs))]
#[cfg_attr(
doc,
doc = r#"
Defines options for config and configuration related things. Any command that involves the build graph should include these options.
"#
)]
/// Defines options for config and configuration related things. Any command that involves the build graph should include these options.
#[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)]
pub(crate) struct CommonConfigOptions {
#[clap(
Expand Down Expand Up @@ -258,15 +242,7 @@ impl CommonConfigOptions {
}
}

// Workaround to have rustdoc that doesn't override cli help docs.
// See https://github.com/TeXitoi/structopt/issues/333
#[cfg_attr(not(doc), allow(missing_docs))]
#[cfg_attr(
doc,
doc = r#"
Defines common options for build-like commands (build, test, install).
"#
)]
/// Defines common options for build-like commands (build, test, install).
#[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)]
pub(crate) struct CommonBuildOptions {
/// Print a build report
Expand Down Expand Up @@ -361,15 +337,7 @@ impl CommonBuildOptions {
}
}

// Workaround to have rustdoc that doesn't override cli help docs.
// See https://github.com/TeXitoi/structopt/issues/333
#[cfg_attr(not(doc), allow(missing_docs))]
#[cfg_attr(
doc,
doc = r#"
Defines common console options for commands.
"#
)]
/// Defines common console options for commands.
#[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)]
pub(crate) struct CommonConsoleOptions {
#[clap(
Expand Down
10 changes: 1 addition & 9 deletions cli/src/commands/uquery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@ enum QueryOutputFormatArg {
Json,
}

/// Perform the target graph query
// Workaround for https://github.com/TeXitoi/structopt/issues/333
#[cfg_attr(not(doc), allow(missing_docs))]
#[cfg_attr(
doc,
doc = r#"
Perform the target graph query
"#
)]
/// Args common to all the query commands
#[derive(Debug, clap::Parser)]
pub(crate) struct CommonQueryArgs {
#[clap(name = "QUERY", help = "the query to evaluate")]
Expand Down

0 comments on commit 7ca535d

Please sign in to comment.