mirror of
https://github.com/enso-org/enso.git
synced 2024-11-26 08:52:58 +03:00
Fixes for --wasm-size-limit option (#3965)
It will use 0 as a default when `--skip-wasm-opt` is given and will be properly propagated to watch command when disabled.
This commit is contained in:
parent
308f4edc21
commit
9edcae2fd4
@ -333,6 +333,8 @@ impl IsWatchable for Wasm {
|
||||
}
|
||||
if let Some(wasm_size_limit) = wasm_size_limit {
|
||||
watch_cmd.args(["--wasm-size-limit", wasm_size_limit.to_string().as_str()]);
|
||||
} else {
|
||||
watch_cmd.args(["--wasm-size-limit", "0"]);
|
||||
}
|
||||
|
||||
// === cargo-watch options ===
|
||||
|
@ -85,7 +85,11 @@ pub struct BuildInput {
|
||||
|
||||
/// Fail the build if compressed WASM exceeds the specified size. Supports format like
|
||||
/// "4.06MiB". Pass "0" to disable check.
|
||||
#[clap(long, enso_env(), default_value_if("skip_wasm_opt", Some("true"), Some("0")), maybe_default = DEFAULT_WASM_SIZE_LIMIT.get())]
|
||||
#[clap(long, enso_env(),
|
||||
maybe_default = DEFAULT_WASM_SIZE_LIMIT.get(),
|
||||
default_value_if("skip-wasm-opt", Some("true"), Some("0")),
|
||||
default_value_if("skip-wasm-opt", None, Some("0")),
|
||||
)]
|
||||
pub wasm_size_limit: Option<byte_unit::Byte>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user