wabt.js icon indicating copy to clipboard operation
wabt.js copied to clipboard

update wabt to fix wabt.js not working in strict mode

Open Changqing-JING opened this issue 1 year ago • 7 comments

Changqing-JING avatar Jan 22 '24 02:01 Changqing-JING

@dcodeIO To fix some bugs in wabt, a new version wabt need to be integrated. But the CI of this repo hasn't run for long time. Is this possible to reopen the CI and publish a new version to npm?

Changqing-JING avatar Jan 22 '24 02:01 Changqing-JING

I guess the workflow has been automatically disabled quite a while ago, probably due to upstream changes not resulting in any changes to the build artifacts. Triggered the workflow manually now, let's see how that goes. If it works, we could merge just the changes to build.yml of this PR.

dcodeIO avatar Jan 22 '24 14:01 dcodeIO

Hrm, seems there are errors upstream preventing the build from completing (see). If I'm not mistaken, there were some Emscripten changes a while ago also involving the removal of writeAsciiToMemory, and it looks like these changes haven't been addressed by the upstream repo yet, hence failing this repo's sanity tests.

Two possible paths:

  • Fix the upstream bindings, which I'd prefer
  • If not possible, downgrade Emscripten to the last known working version here

dcodeIO avatar Jan 22 '24 14:01 dcodeIO

@dcodeIO Thank you very much! This PR can fix the writeAsciiToMemory error. The writeAsciiToMemory is not removed, but it's not exported by default in new version emcc. I have already fixed this bug in wabt by adding option in cmake file: https://github.com/WebAssembly/wabt/pull/2367

It's the reason why I want to update wabt here.

By merging this PR, the build pipeline should work again.

Changqing-JING avatar Jan 23 '24 02:01 Changqing-JING

The CI resets the wabt commit ID to lastest tag, which is 1.0.34 now. But the writeAsciiToMemory is not integrated in 1.0.34. Shall we wait for next wabt release tag and rerun the CI?

Changqing-JING avatar Jan 23 '24 03:01 Changqing-JING

Iirc the code to determine the version to build lives around here:

https://github.com/AssemblyScript/wabt.js/blob/72796586d0e03118e18f5f85278f4742091a847f/scripts/version.js#L43-L46

I guess we could either exclude the specific version, create a dummy tag in this repo, or wait for a new release upstream?

dcodeIO avatar Jan 23 '24 18:01 dcodeIO

We can wait for a new release upstream.

Changqing-JING avatar Jan 24 '24 02:01 Changqing-JING

No upstream release yet, but I fixed it otherwise.

dcodeIO avatar May 09 '24 10:05 dcodeIO