Load Ruby Language using wasm failed
thibaultdalban opened this issue · comments
Hello,
I cannot load this Language
through wasm.
import Parser from "web-tree-sitter"
await Parser.init()
const parser = new Parser()
const Lang = await Parser.Language.load("tree-sitter-ruby.wasm")
parser.setLanguage(Lang)
Error:
{
"errorMessage": "e[Object.keys(...).find(...)] is not a function",
"errorType": "TypeError",
"stackTrace": [
"TypeError: e[Object.keys(...).find(...)] is not a function",
" at /home/xxx/code/xxx/node_modules/web-tree-sitter/tree-sitter.js:1:45617",
" at handler (/home/xxx/code/xxx/.webpack/index/webpack:home/xxx/code/xxx/index.ts:23:16)"
]
}
The code fails on const Lang = await Parser.Language.load("tree-sitter-ruby.wasm")
.
Testing with tree-sitter-javascript.wasm
works.
Both wasm files have been generated using https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web#generate-wasm-language-files
As the code is working with another Language
, I guess it's not an issue related with web-tree-sitter
but with the ruby Language
.
Let me know If you need anything else to figure out the issue.
What version of tree-sitter-ruby are you using? Try the master branch of the repo, or 0.16.2 on npm.
I'm using the version 0.16.1
, I will try with the new release 👍