wabt icon indicating copy to clipboard operation
wabt copied to clipboard

Wast2Json fails on the testsuite

Open CharlieTap opened this issue 3 months ago • 5 comments

Running the latest wast2json (1.0.34) on comments.wast or if.wast fails with the following errors:

comments.wast:104:1: error: unexpected token "(", expected a binary module or a text module.
(assert_return (invoke "f1") (i32.const 2))
^
comments.wast:104:30: error: unexpected token (, expected EOF.
(assert_return (invoke "f1") (i32.const 2))
                             ^
if.wast:533:33: error: unexpected token (, expected ).
    (if (i32.const 1) (i32.eqz) (then) (else))
                                ^
if.wast:537:17: error: unexpected token "invoke", expected an instr.
(assert_return (invoke "empty" (i32.const 0)))
                ^^^^^^

CharlieTap avatar Apr 29 '24 20:04 CharlieTap

wast2json is only known to work on the version of the testsuite that wabt itself includes as a submodule. Once that gets updated I assume wast2json will get updated too, but we don't know of any efforts to update currently.

sbc100 avatar Apr 29 '24 20:04 sbc100

wast2json (from Git) does work on the latest if.wast (since #2349); we just haven't done a release since then.

We do need to update for the spec change that affected comments.wast (https://github.com/WebAssembly/spec/pull/1684).

keithw avatar Apr 29 '24 21:04 keithw

I'm trying to roll the testsuite now and I'm running into this issue too. Do you have a fix the comments.wast issue @keithw ?

sbc100 avatar May 03 '24 22:05 sbc100

Unfortunately I haven't looked at this one yet.

keithw avatar May 03 '24 22:05 keithw

FYI I looked into just now and made some progres.... but haven't fully figured it out yet.

sbc100 avatar May 04 '24 00:05 sbc100

The comments.wast issue was fixed in #2416

sbc100 avatar May 14 '24 16:05 sbc100

Whats the chances we can get a release soon for this? I'd like to update this in the CI for my project but I don't build from source as it takes a while 😅

CharlieTap avatar May 14 '24 17:05 CharlieTap

I don't see why we can't do one right now.. I'll see its as simple as just creating a release..

sbc100 avatar May 14 '24 17:05 sbc100