From 6380803dae279d388300b3bc0524d86a11c604ae Mon Sep 17 00:00:00 2001 From: bhavik-goplani <56516858+bhavik-goplani@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:54:02 -0500 Subject: [PATCH] Changed run as an alias to run-c --- src/main.rs | 6 ++---- tests/snapshots/cli__debug_list_map.bend.snap | 2 +- tests/snapshots/cli__debug_u60_to_nat.bend.snap | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9a8ac3a4..82f3cc23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,9 +50,8 @@ enum Mode { /// Compiles the program and runs it with the Rust HVM implementation. RunRs(RunArgs), /// Compiles the program and runs it with the C HVM implementation. + #[command(alias = "run")] RunC(RunArgs), - /// Compiles the program and runs it with the C HVM implementation. - Run(RunArgs), /// Compiles the program and runs it with the Cuda HVM implementation. RunCu(RunArgs), /// Compiles the program to hvm and prints to stdout. @@ -310,8 +309,7 @@ fn execute_cli_mode(mut cli: Cli) -> Result<(), Diagnostics> { println!("{}", hvm_book_show_pretty(&compile_res.hvm_book)); } - Mode::Run(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) - | Mode::RunC(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) + Mode::RunC(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) | Mode::RunCu(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) | Mode::RunRs(RunArgs { pretty, run_opts, comp_opts, warn_opts, path, arguments }) => { let CliRunOpts { linear, print_stats } = run_opts; diff --git a/tests/snapshots/cli__debug_list_map.bend.snap b/tests/snapshots/cli__debug_list_map.bend.snap index de105f53..faa90652 100644 --- a/tests/snapshots/cli__debug_list_map.bend.snap +++ b/tests/snapshots/cli__debug_list_map.bend.snap @@ -6,6 +6,6 @@ error: unexpected argument '-d' found tip: to pass '-d' as a value, use '-- -d' -Usage: bend run [OPTIONS] [ARGUMENTS]... +Usage: bend run-c [OPTIONS] [ARGUMENTS]... For more information, try '--help'. diff --git a/tests/snapshots/cli__debug_u60_to_nat.bend.snap b/tests/snapshots/cli__debug_u60_to_nat.bend.snap index 6d607824..5f55b13e 100644 --- a/tests/snapshots/cli__debug_u60_to_nat.bend.snap +++ b/tests/snapshots/cli__debug_u60_to_nat.bend.snap @@ -6,6 +6,6 @@ error: unexpected argument '-d' found tip: to pass '-d' as a value, use '-- -d' -Usage: bend run [OPTIONS] [ARGUMENTS]... +Usage: bend run-c [OPTIONS] [ARGUMENTS]... For more information, try '--help'.