From: Dmitri Shuralyov Date: Thu, 2 Nov 2023 03:08:53 +0000 (-0400) Subject: misc/wasm: silence Wasmtime 14 CLI warning X-Git-Tag: go1.22rc1~437 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=450f469c3c3e0a328ab99380cc956a77e7943b89;p=gostls13.git misc/wasm: silence Wasmtime 14 CLI warning The latest version of Wasmtime, 14.0.4 as of writing this, offers a new CLI while also supporting the old CLI. Since this is known and tracked in issue #63718, silence the warning that otherwise causes many tests to fail. Since Wasmtime 13 and older don't pay attention to WASMTIME_NEW_CLI, this change increases compatibility of the script, letting it work with Wasmtime 9.0.1 as currently tested by the old cmd/coordinator, and with Wasmtime 14.0.4 as currently tested in the new LUCI infrastructure. The rest of the transition is left as future work. For #63718. For #61116. Change-Id: I77d4f74cc1d34a657e48dcaaceb6fbda7d1e9428 Cq-Include-Trybots: luci.golang.try:gotip-wasip1-wasm_wasmtime Reviewed-on: https://go-review.googlesource.com/c/go/+/538699 Auto-Submit: Dmitri Shuralyov Reviewed-by: Johan Brandhorst-Satzkorn Reviewed-by: Cherry Mui Run-TryBot: Dmitri Shuralyov TryBot-Result: Gopher Robot LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- diff --git a/misc/wasm/go_wasip1_wasm_exec b/misc/wasm/go_wasip1_wasm_exec index 0351994364..dc110327af 100755 --- a/misc/wasm/go_wasip1_wasm_exec +++ b/misc/wasm/go_wasip1_wasm_exec @@ -14,7 +14,8 @@ case "$GOWASIRUNTIME" in exec wazero run -mount /:/ -env-inherit -cachedir "${TMPDIR:-/tmp}"/wazero ${GOWASIRUNTIMEARGS:-} "$1" "${@:2}" ;; "wasmtime" | "") - exec wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}" + # TODO(go.dev/issue/63718): Switch to the new CLI offered in the major version 14 of Wasmtime. + exec env WASMTIME_NEW_CLI=0 wasmtime run --dir=/ --env PWD="$PWD" --env PATH="$PATH" --max-wasm-stack 1048576 ${GOWASIRUNTIMEARGS:-} "$1" -- "${@:2}" ;; *) echo "Unknown Go WASI runtime specified: $GOWASIRUNTIME"