solo-io / proxy-runtime

Apache License 2.0
86 stars 25 forks source link

Compile error when calling stream_context.headers.request.get_headers() #42

Open amiramw opened 3 years ago

amiramw commented 3 years ago

When my filter code try to call stream_context.headers.request.get_headers() it cause the following compile error:

Building with npm...skipping login
running npm install && npm run asbuild
npm WARN workspace No description
npm WARN workspace No repository field.
npm WARN workspace No license field.

audited 5 packages in 1.17s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> @ asbuild /src/workspace
> npm run asbuild:untouched && npm run asbuild:optimized

> @ asbuild:untouched /src/workspace
> asc assembly/index.ts -b build/untouched.wasm --use abort=abort_proc_exit -t build/untouched.wat --validate --sourceMap --debug

ERROR TS2365: Operator '<' cannot be applied to types 'i32' and 'u32'.

   for (let i = 0; i < numheaders; i++) {
                   ~~~~~~~~~~~~~~
 in ~lib/@solo-io/proxy-runtime/runtime.ts(291,18)

ERROR: Compile error
    at Object.main (/src/workspace/node_modules/assemblyscript/cli/asc.js:583:21)
    at /src/workspace/node_modules/assemblyscript/bin/asc:21:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ asbuild:untouched: `asc assembly/index.ts -b build/untouched.wasm --use abort=abort_proc_exit -t build/untouched.wat --validate --sourceMap --debug`
npm ERR! Exit status 1
yuval-k commented 3 years ago

that's a new one.. what version of asm script are you using?

amiramw commented 3 years ago

my assemblyscript version is 0.9.1 and I created my filter project using wasme init