-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix spin up --help
omitting many options if app is not ready to lock
#934
Fix spin up --help
omitting many options if app is not ready to lock
#934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor style suggestions
src/commands/up.rs
Outdated
let help_args = vec![OsString::from("--help-args-only")]; | ||
cmd.args(help_args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can simplify since it doesn't have to match the type of trigger_args
:
let help_args = vec![OsString::from("--help-args-only")]; | |
cmd.args(help_args); | |
cmd.arg("--help-args-only"); |
src/commands/up.rs
Outdated
@@ -199,6 +188,25 @@ impl UpCommand { | |||
} | |||
} | |||
|
|||
fn build_locked_app( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe?
fn build_locked_app( | |
fn write_locked_app( |
name = "unbuilt" | ||
trigger = { type = "http", base = "/" } | ||
version = "0.1.0" | ||
[[component]] | ||
id = "unbuilt" | ||
source = "DOES-NOT-EXIST.wasm" | ||
[component.trigger] | ||
route = "/..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOML doesn't mind indent...
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
4502cc8
to
06d1c15
Compare
Partially fixes #932.
There remains an outstanding issue where
spin up --help
will skip "trigger" arguments if the app contains no components. This happens because the serialisation objects makecomponent
a mandatory field, so we cannot even load the file in this case. This could be addressed by makingcomponent
optional, and validating that at least one component exists during the locking process (or otherwise after the initial load). This is probably a bit of a niche case though.Signed-off-by: itowlson ivan.towlson@fermyon.com