You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Divy
I'm currently working on a rewrite of the dep tree module but I'm facing a few issues
Consider the folloing code:
importinit,{source,tree}from"https://x.nest.land/analyzer@0.0.6/wasm/wasm.js";awaitinit(source);try{tree("","{{");}catch(err){console.log(err);}try{tree("","const x = 5;");}catch(err){console.log(err);}
The first call analyzes {{. This code is obviously not valid javascript.
Some error messages are displayed even if I remove the console.log.
The second call analyzes const x = 5; which is valid javascript but the wasm function is still stuck.
panicked at 'called `Result::unwrap()` on an `Err` value: SwcDiagnosticBuffer { diagnostics: ["Unexpected eof at :1:2"] }', src/lib.rs:19:6
Stack:
Error
at Y.g.wbg.__wbg_new_59cb74e423758ede (https://3cfd3lulgczqtos7nd7bcmymng2nybpbdzsdljvpo64uo3vyx4kq.arweave.net/2Io9roswswm6X2j-ETMMabTcBeEeZDWmr3e5R264vxU/wasm/wasm.js:2:1169976)
at <anonymous> (<anonymous>:0:638559)
at <anonymous> (<anonymous>:0:791204)
at <anonymous> (<anonymous>:0:673555)
at <anonymous> (<anonymous>:0:770656)
at <anonymous> (<anonymous>:0:778289)
at <anonymous> (<anonymous>:0:742880)
at tree (<anonymous>:0:558415)
at tree (https://3cfd3lulgczqtos7nd7bcmymng2nybpbdzsdljvpo64uo3vyx4kq.arweave.net/2Io9roswswm6X2j-ETMMabTcBeEeZDWmr3e5R264vxU/wasm/wasm.js:2:1168676)
at graph.ts:137:3
RuntimeError: unreachable
at <anonymous> (<anonymous>:0:673586)
at <anonymous> (<anonymous>:0:770656)
at <anonymous> (<anonymous>:0:778289)
at <anonymous> (<anonymous>:0:742880)
at tree (<anonymous>:0:558415)
at tree (https://3cfd3lulgczqtos7nd7bcmymng2nybpbdzsdljvpo64uo3vyx4kq.arweave.net/2Io9roswswm6X2j-ETMMabTcBeEeZDWmr3e5R264vxU/wasm/wasm.js:2:1168676)
at graph.ts:137:3
panicked at 'cannot modify the panic hook from a panicking thread', src/libstd/panicking.rs:106:9
Stack:
Error
at Y.g.wbg.__wbg_new_59cb74e423758ede (https://3cfd3lulgczqtos7nd7bcmymng2nybpbdzsdljvpo64uo3vyx4kq.arweave.net/2Io9roswswm6X2j-ETMMabTcBeEeZDWmr3e5R264vxU/wasm/wasm.js:2:1169976)
at <anonymous> (<anonymous>:0:638559)
at <anonymous> (<anonymous>:0:791204)
at <anonymous> (<anonymous>:0:673555)
at <anonymous> (<anonymous>:0:778894)
at tree (<anonymous>:0:558349)
at tree (https://3cfd3lulgczqtos7nd7bcmymng2nybpbdzsdljvpo64uo3vyx4kq.arweave.net/2Io9roswswm6X2j-ETMMabTcBeEeZDWmr3e5R264vxU/wasm/wasm.js:2:1168676)
at graph.ts:143:3
RuntimeError: unreachable
at <anonymous> (<anonymous>:0:673584)
at <anonymous> (<anonymous>:0:778894)
at tree (<anonymous>:0:558349)
at tree (https://3cfd3lulgczqtos7nd7bcmymng2nybpbdzsdljvpo64uo3vyx4kq.arweave.net/2Io9roswswm6X2j-ETMMabTcBeEeZDWmr3e5R264vxU/wasm/wasm.js:2:1168676)
at graph.ts:143:3
I really don't have any rust skills, I'd like to fix this bug, but I can't 😅
I've looked for other AST parsers but yours is really the most suitable.
The text was updated successfully, but these errors were encountered:
Hi Divy
I'm currently working on a rewrite of the dep tree module but I'm facing a few issues
Consider the folloing code:
The first call analyzes
{{
. This code is obviously not valid javascript.Some error messages are displayed even if I remove the
console.log
.The second call analyzes
const x = 5;
which is valid javascript but the wasm function is still stuck.I really don't have any rust skills, I'd like to fix this bug, but I can't 😅
I've looked for other AST parsers but yours is really the most suitable.
The text was updated successfully, but these errors were encountered: