@@ -915,17 +915,29 @@ pub struct CompileScriptFunction {
915
915
#[ clap( long, default_value_if( "move_2" , "true" , "7" ) ) ]
916
916
pub bytecode_version : Option < u32 > ,
917
917
918
+ /// Specify the version of the compiler.
919
+ /// Defaults to the latest stable compiler version (at least 2)
918
920
#[ clap( long, value_parser = clap:: value_parser!( CompilerVersion ) ,
919
- default_value_if( "move_2" , "true" , LATEST_STABLE_COMPILER_VERSION ) ) ]
921
+ default_value = LATEST_STABLE_COMPILER_VERSION ,
922
+ default_value_if( "move_2" , "true" , LATEST_STABLE_COMPILER_VERSION ) ,
923
+ default_value_if( "move_1" , "true" , "1" ) , ) ]
920
924
pub compiler_version : Option < CompilerVersion > ,
921
925
926
+ /// Specify the language version to be supported.
927
+ /// Defaults to the latest stable language version (at least 2)
922
928
#[ clap( long, value_parser = clap:: value_parser!( LanguageVersion ) ,
923
- default_value_if( "move_2" , "true" , LATEST_STABLE_LANGUAGE_VERSION ) ) ]
929
+ default_value = LATEST_STABLE_LANGUAGE_VERSION ,
930
+ default_value_if( "move_2" , "true" , LATEST_STABLE_LANGUAGE_VERSION ) ,
931
+ default_value_if( "move_1" , "true" , "1" ) , ) ]
924
932
pub language_version : Option < LanguageVersion > ,
925
933
926
934
/// Select bytecode, language, compiler for Move 2
927
- #[ clap( long) ]
935
+ #[ clap( long, default_value_t = true ) ]
928
936
pub move_2 : bool ,
937
+
938
+ /// Select bytecode, language, and compiler versions for Move 1.
939
+ #[ clap( long, default_value_t = false ) ]
940
+ pub move_1 : bool ,
929
941
}
930
942
931
943
impl CompileScriptFunction {
0 commit comments