Closed dcodeIO closed 3 years ago
I've merged #27 which replaces Jest with as-pect. I've tried running the v0.18 upgrade on this code, however as-pect fails as follows:
[TestFile.ts] node_modules/@as-pect/assembly/assembly/index.ts --runtime stub --target test --debug --binaryFile output.wasm --explicitStart --use ASC_RTRACE=1 --exportTable --importMemory --transform /Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/core/lib/transform/index.js
/Users/colineberhardt/Projects/as-regex/node_modules/assemblyscript/lib/loader/umd/index.js:375
const instance = new WebAssembly.Instance(module, imports);
^
LinkError: WebAssembly.Instance(): Import #11 module="rtrace" function="onstore" error: function import requires a callable
at instantiateSync (/Users/colineberhardt/Projects/as-regex/node_modules/assemblyscript/lib/loader/umd/index.js:375:22)
at imports (/Users/colineberhardt/Projects/as-regex/as-pect.config.js:35:16)
at runBinary (/Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/cli/lib/run.js:438:26)
at /Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/cli/lib/run.js:651:42
at wrappedCallback (/Users/colineberhardt/Projects/as-regex/node_modules/assemblyscript/cli/asc.js:436:14)
at Object.main (/Users/colineberhardt/Projects/as-regex/node_modules/assemblyscript/cli/asc.js:1058:10)
at /Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/cli/lib/run.js:602:17
at Array.forEach (<anonymous>)
at run (/Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/cli/lib/run.js:600:36)
at Object.asp (/Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/cli/lib/index.js:64:9)
at Object.<anonymous> (/Users/colineberhardt/Projects/as-regex/node_modules/@as-pect/cli/lib/test.js:2:28)
at Module._compile (node:internal/modules/cjs/loader:1102:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
at Module.load (node:internal/modules/cjs/loader:967:32)
at Function.Module._load (node:internal/modules/cjs/loader:807:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47
I presume this is expected, and I need to wait for as-pect to update?
I presume this is expected, and I need to wait for as-pect to update?
yes. I told it's too early migrate to as-pect for now.
cc @jtenner
Thanks @dcodeIO - merged via this commit https://github.com/ColinEberhardt/assemblyscript-regex/commit/530e807eaa27a9f4033b66047a091d8e9188e066
This PR upgrades AS to soon-to-be-released v0.18. Makes the necessary changes to the runtime interface so it passes the test suite and benchmark.
A few strange things seemed to be going on:
could not parse test case 28
Package subpath './umd/index.js' is not defined by "exports"
in node v15, so I needed to change arequire