Skip to content

Commit

Permalink
Merge #2221
Browse files Browse the repository at this point in the history
2221: Fix flag conflicts. r=nlewycky a=nlewycky

These strings have to refer to the flag name, not the field member name, and clap derive converts the underscores to hyphens. This was being caught by debug_asserts in clap.


Co-authored-by: Nick Lewycky <nick@wasmer.io>
  • Loading branch information
bors[bot] and nlewycky authored Mar 30, 2021
2 parents 72d4733 + 50456b9 commit 01cf8e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/cli/src/commands/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ use std::path::PathBuf;
/// The options for the `wasmer config` subcommand
pub struct Config {
/// Print the installation prefix.
#[clap(long, conflicts_with = "pkg_config")]
#[clap(long, conflicts_with = "pkg-config")]
prefix: bool,

/// Directory containing Wasmer executables.
#[clap(long, conflicts_with = "pkg_config")]
#[clap(long, conflicts_with = "pkg-config")]
bindir: bool,

/// Directory containing Wasmer headers.
#[clap(long, conflicts_with = "pkg_config")]
#[clap(long, conflicts_with = "pkg-config")]
includedir: bool,

/// Directory containing Wasmer libraries.
#[clap(long, conflicts_with = "pkg_config")]
#[clap(long, conflicts_with = "pkg-config")]
libdir: bool,

/// Libraries needed to link against Wasmer components.
#[clap(long, conflicts_with = "pkg_config")]
#[clap(long, conflicts_with = "pkg-config")]
libs: bool,

/// C compiler flags for files that include Wasmer headers.
#[clap(long, conflicts_with = "pkg_config")]
#[clap(long, conflicts_with = "pkg-config")]
cflags: bool,

/// It outputs the necessary details for compiling
Expand Down
4 changes: 2 additions & 2 deletions lib/cli/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ pub struct StoreOptions {
compiler: CompilerOptions,

/// Use JIT Engine.
#[clap(long, conflicts_with_all = &["native", "object_file"])]
#[clap(long, conflicts_with_all = &["native", "object-file"])]
jit: bool,

/// Use Native Engine.
#[clap(long, conflicts_with_all = &["jit", "object_file"])]
#[clap(long, conflicts_with_all = &["jit", "object-file"])]
native: bool,

/// Use ObjectFile Engine.
Expand Down

0 comments on commit 01cf8e8

Please sign in to comment.