Skip to content

Commit 33e254a

Browse files
Peponks9onbjerg
andauthored
chore: move clap.rs from foundry-common to foundry-cli (#11747)
Move clap.rs from foundry-common to foundry-cli Co-authored-by: onbjerg <[email protected]>
1 parent 9ec8539 commit 33e254a

File tree

12 files changed

+14
-14
lines changed

12 files changed

+14
-14
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/anvil/src/args.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn run_command(args: Anvil) -> Result<()> {
3535
}
3636
AnvilSubcommand::GenerateFigSpec => {
3737
clap_complete::generate(
38-
foundry_common::clap::Shell::Fig,
38+
foundry_cli::clap::Shell::Fig,
3939
&mut Anvil::command(),
4040
"anvil",
4141
&mut std::io::stdout(),
@@ -82,7 +82,7 @@ mod tests {
8282
assert!(matches!(
8383
args.cmd,
8484
Some(AnvilSubcommand::Completions {
85-
shell: foundry_common::clap::Shell::ClapCompleteShell(clap_complete::Shell::Bash)
85+
shell: foundry_cli::clap::Shell::ClapCompleteShell(clap_complete::Shell::Bash)
8686
})
8787
));
8888
}

crates/anvil/src/opts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub enum AnvilSubcommand {
2424
#[command(visible_alias = "com")]
2525
Completions {
2626
#[arg(value_enum)]
27-
shell: foundry_common::clap::Shell,
27+
shell: foundry_cli::clap::Shell,
2828
},
2929

3030
/// Generate Fig autocompletion spec. Deprecated: use `anvil completions fig` instead.

crates/cast/src/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ pub async fn run_command(args: CastArgs) -> Result<()> {
731731
}
732732
CastSubcommand::GenerateFigSpec => {
733733
generate(
734-
foundry_common::clap::Shell::Fig,
734+
foundry_cli::clap::Shell::Fig,
735735
&mut CastArgs::command(),
736736
"cast",
737737
&mut std::io::stdout(),

crates/cast/src/opts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ pub enum CastSubcommand {
10761076
#[command(visible_alias = "com")]
10771077
Completions {
10781078
#[arg(value_enum)]
1079-
shell: foundry_common::clap::Shell,
1079+
shell: foundry_cli::clap::Shell,
10801080
},
10811081

10821082
/// Generate Fig autocompletion spec. Deprecated: use `cast completions fig` instead.

crates/cli/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ alloy-ens = { workspace = true, features = ["provider"] }
3434

3535
cfg-if = "1.0"
3636
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
37+
clap_complete.workspace = true
38+
clap_complete_nushell.workspace = true
39+
clap_complete_fig = "4"
3740
color-eyre.workspace = true
3841
dotenvy = "0.15"
3942
eyre.workspace = true
File renamed without changes.

crates/cli/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extern crate foundry_common;
1111
#[macro_use]
1212
extern crate tracing;
1313

14+
pub mod clap;
1415
pub mod handler;
1516
pub mod opts;
1617
pub mod utils;

crates/common/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ solar.workspace = true
5151
tower.workspace = true
5252

5353
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
54-
clap_complete.workspace = true
55-
clap_complete_nushell.workspace = true
56-
clap_complete_fig = "4"
5754
comfy-table.workspace = true
5855
dunce.workspace = true
5956
eyre.workspace = true

crates/common/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pub use foundry_common_fmt as fmt;
1818

1919
pub mod abi;
2020
pub mod calc;
21-
pub mod clap;
2221
pub mod comments;
2322
pub mod compile;
2423
pub mod constants;

0 commit comments

Comments
 (0)