Conversation
3f2a3ac to
80d3faf
Compare
bpapillon
left a comment
There was a problem hiding this comment.
We need to update package.json to include wasm files right?
Side note - I updated our E2E tests so that we could smoke test for issues like this, I can use this case to test whether this testing mode actually catches the intended problem
ea28ac1 to
cb8b880
Compare
| this.wasmInstance = new wasm.RulesEngineJS(); | ||
| this.initialized = true; | ||
| } catch (error) { | ||
| throw new Error(`Failed to initialize WASM rules engine: ${error}`); |
There was a problem hiding this comment.
When I run tests against this a built sdk and datastream enabled, I always hit this catch case and fall back to non-datastream rule evaluation. I think it may be because the path here does not match where the file is placed in dist/:
^schematic-node (chris/schy-250-improve-wasm-integrations)$ ls -al dist/*.wasm
-rw-r--r-- 1 bpapillon staff 324035 Mar 2 14:25 dist/rulesengine_bg.wasm
^schematic-node (chris/schy-250-improve-wasm-integrations)$ ls -al dist/wasm/
total 0
drwxr-xr-x 2 bpapillon staff 64 Mar 31 08:20 .
drwxr-xr-x 37 bpapillon staff 1184 Mar 31 08:20 ..
There was a problem hiding this comment.
i tnink this is because you need to download the wasm files before you build ./script/download-wasm.sh now that we don't have the file checked in. maybe we should add a validation that the files are there when we build.
f55ddae to
5840470
Compare
No description provided.