seedwing-io / seedwing-policy

A functional type system for policy inspection, audit and enforcement.
https://www.seedwing.io
Apache License 2.0
12 stars 15 forks source link

Wasm component issue when updating to jco 0.10.3 #239

Open danbev opened 1 year ago

danbev commented 1 year ago

When trying to update jco to version 0.10.3 the following error is generated:

make wit-javascript-bindings 
cd wit-examples/javascript && npm run bindings

> seedwing-policy-engine-js@0.1.0 bindings
> npx jco transpile $npm_package_config_wasm_file -o dist && npx tsc

(jco transpile) ComponentError: failed to extract interface information from component

Caused by:
    record type must have at least one field (at offset 0x871)
    at generate (file:///home/danielbevenius/work/security/seedwing/seedwing-policy/engine/wit-examples/javascript/node_modules/@bytecodealliance/jco/obj/js-component-bindgen-component.js:1853:11)
    at transpileComponent (file:///home/danielbevenius/work/security/seedwing/seedwing-policy/engine/wit-examples/javascript/node_modules/@bytecodealliance/jco/src/cmd/transpile.js:105:37)
    at async transpile (file:///home/danielbevenius/work/security/seedwing/seedwing-policy/engine/wit-examples/javascript/node_modules/@bytecodealliance/jco/src/cmd/transpile.js:24:21)
    at async file:///home/danielbevenius/work/security/seedwing/seedwing-policy/engine/wit-examples/javascript/node_modules/@bytecodealliance/jco/src/jco.js:117:9
make: *** [Makefile:53: wit-javascript-bindings] Error 1