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
The last version where setTimeoutMicros works in the web-tree-sitter package is 0.22.2. I've tested with version 0.22.3-0.22.6 and none of them seem to respect the timeout set by setTimeoutMicros
Steps to reproduce
Here's an example. When I run it with 0.22.2, I can see that several rounds are run (for my sample source it's 19), but newer versions I only see 1 round get run.
Parser.init().then(async()=>{constparser=newParser();constts=awaitParser.Language.load('./src/tree-sitter-typescript.wasm');parser.setLanguage(ts);parser.setTimeoutMicros(50000);leterror=true;lettimeoutTree;letrounds=0;while(error){rounds++;try{timeoutTree=parser.parse(source);if(timeoutTree){error=false;}}catch(e){// expected because we've set a timeout that will be hit}}console.log('rounds:',rounds);});
Expected behavior
The timeout set with setTimeoutMicros is respected.
Tree-sitter version (tree-sitter --version)
0.22.6
Operating system/version
Windows 11
The text was updated successfully, but these errors were encountered:
alexr00
changed the title
setTimeoutMicros doesn't appear to work in the latest versionssetTimeoutMicros doesn't appear to work in the latest versions of web-tree-sitterMay 6, 2024
Problem
The last version where
setTimeoutMicros
works in theweb-tree-sitter
package is0.22.2
. I've tested with version0.22.3
-0.22.6
and none of them seem to respect the timeout set bysetTimeoutMicros
Steps to reproduce
Here's an example. When I run it with
0.22.2
, I can see that several rounds are run (for my samplesource
it's 19), but newer versions I only see 1 round get run.Expected behavior
The timeout set with
setTimeoutMicros
is respected.Tree-sitter version (tree-sitter --version)
0.22.6
Operating system/version
Windows 11
The text was updated successfully, but these errors were encountered: