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
Tree sitter compiled with emscripten (which I guess is currently distributed via npm) aborts the process in case of any unhandled promise rejections.
This is very weird and not acceptable.
The investigation on this issue was initiated at totally unrealted rust-analyzer repo. It was quite hard-to-debug since it involved quite a lot of parties and stars to match in order to reproduce.
See the following logs (the process is terminated without consulting the user)
Error: My error
Error: My error
/home/veetaha/my/junk/rollup/node_modules/web-tree-sitter/tree-sitter.js:1
var Module=void 0!==Module?Module:{};!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.TreeSitter=t()}(0,function(){var e,t={};for(e in Module)Module.hasOwnProperty(e)&&(t[e]=Module[e]);var r,n,o=[],s=function(e,t){throw t},_=!1,a=!1;_="object"==typeof window,a="function"==typeof importScripts,r="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,n=!_&&!r&&!a;var u,i,l,d,c="";r?(c=a?require("path").dirname(c)+"/":__dirname+"/",u=function(e,t){return l||(l=require("fs")),d||(d=require("path")),e=d.normalize(e),l.readFileSync(e,t?null:"utf8")},i=function(e){var t=u(e,!0);return t.buffer||(t=new Uint8Array(t)),q(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),o=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),process.on("uncaughtException",function(e){if(!(e instanceof Ze))thr
RuntimeError: abort(Error: My error). Build with -s ASSERTIONS=1 for more info.
at process.de (/home/veetaha/my/junk/rollup/node_modules/web-tree-sitter/tree-sitter.js:1:10108)
at process.emit (events.js:321:20)
at processPromiseRejections (internal/process/promises.js:209:33)
at processTicksAndRejections (internal/process/task_queues.js:98:32)
It seems like this will be the default behavior for Node.js in the future, but I agree that there's no reason for the Tree-sitter module to add a global unhandled rejection listener.
Tree sitter compiled with
emscripten
(which I guess is currently distributed vianpm
) aborts the process in case of any unhandled promise rejections.This is very weird and not acceptable.
The investigation on this issue was initiated at totally unrealted
rust-analyzer
repo. It was quite hard-to-debug since it involved quite a lot of parties and stars to match in order to reproduce.Steps to reproduce:
See the following logs (the process is terminated without consulting the user)
My wild guess is that you should enable
NODEJS_CATCH_REJECTION
flag somewhere here:tree-sitter/script/build-wasm
Lines 82 to 100 in 5670dd6
The text was updated successfully, but these errors were encountered: