11use anyhow:: Result ;
2- use clap:: { Parser , ValueEnum } ;
2+ use clap:: { builder :: BoolishValueParser , Parser , ValueEnum } ;
33use clap_verbosity_flag:: InfoLevel ;
44use log:: LevelFilter ;
55use regex:: Regex ;
@@ -41,7 +41,8 @@ struct Args {
4141 #[ arg( short, long) ]
4242 after_build : Option < String > ,
4343
44- #[ arg( short, long, default_value = "false" ) ]
44+ // Disable timing on the output
45+ #[ arg( short, long, default_value = "false" , num_args = 0 ..=1 ) ]
4546 no_timing : bool ,
4647
4748 /// Verbosity:
@@ -56,7 +57,7 @@ struct Args {
5657
5758 /// This creates a source_dirs.json file at the root of the monorepo, which is needed when you
5859 /// want to use Reanalyze
59- #[ arg( short, long, default_value = " false" ) ]
60+ #[ arg( short, long, default_value_t = false , num_args = 0 ..= 1 ) ]
6061 create_sourcedirs : bool ,
6162
6263 /// This prints the compiler arguments. It expects the path to a rescript.json file.
@@ -68,7 +69,7 @@ struct Args {
6869 /// It's important to know that we currently do not discern between project src, and
6970 /// dependencies. So enabling this flag will enable building _all_ development dependencies of
7071 /// _all_ packages
71- #[ arg( long, default_value = " false" ) ]
72+ #[ arg( long, default_value_t = false , num_args = 0 ..= 1 ) ]
7273 dev : bool ,
7374
7475 /// To be used in conjunction with compiler_args
0 commit comments