aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2023-11-01 23:08:53 -0400
committerGopher Robot <gobot@golang.org>2023-11-02 21:23:37 +0000
commit450f469c3c3e0a328ab99380cc956a77e7943b89 (patch)
treec5fd93992ffeb25bf21b94e3647c72a8e6d3cdc5 /misc
parentb7cbcf0c274a0e9f9703468c8ea1d511efe90c5e (diff)
downloadgo-450f469c3c3e0a328ab99380cc956a77e7943b89.tar.gz
go-450f469c3c3e0a328ab99380cc956a77e7943b89.zip
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 <dmitshur@golang.org> Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/wasm/go_wasip1_wasm_exec3
1 files changed, 2 insertions, 1 deletions
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"