Reorder roc glue arguments and add a default

This commit is contained in:
Richard Feldman 2023-03-24 21:46:19 -04:00
parent 0149e7231c
commit 977b7394f5
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
2 changed files with 9 additions and 8 deletions

View file

@ -279,22 +279,23 @@ pub fn build_app<'a>() -> Command<'a> {
.subcommand(Command::new(CMD_GLUE)
.about("Generate glue code between a platform's Roc API and its host language")
.arg(
Arg::new(ROC_FILE)
.help("The .roc file for the platform module")
Arg::new(GLUE_SPEC)
.help("The specification for how to translate Roc types into output files.")
.allow_invalid_utf8(true)
.required(true)
)
.arg(
Arg::new(GLUE_DIR)
.help("The directory for the generated glue code.\nNote: The implementation can write to any file in the directory.")
.help("The directory for the generated glue code.\nNote: The implementation can write to any file in this directory.")
.allow_invalid_utf8(true)
.required(true)
)
.arg(
Arg::new(GLUE_SPEC)
.help("The specification for how to convert roc types into another programming language")
Arg::new(ROC_FILE)
.help("The .roc file whose exposed types should be translated.")
.allow_invalid_utf8(true)
.required(true)
.required(false)
.default_value(DEFAULT_ROC_FILENAME)
)
)
.subcommand(Command::new(CMD_GEN_STUB_LIB)