ikatyang / tree-sitter-yaml

YAML grammar for tree-sitter
https://ikatyang.github.io/tree-sitter-yaml/
MIT License
93 stars 38 forks source link

tree-sitter-cli compatibility #6

Closed char0n closed 3 years ago

char0n commented 3 years ago

Hi @Menci,

When we try to use tree-sitter-cli@0.16.5 to build this YAML grammar everything works great. The moment tree-siter-cli is updated to >=0.16.6 the WASM compile successfully but when you try to run it in browser you'll get:

Couldn't find language function in WASM file. Symbols:
[
  "__post_instantiate",
  "dynCall_X",
  "dynCall_i",
  "dynCall_iii",
  "dynCall_iiii",
  "dynCall_vi",
  "dynCall_vii",
  "dynCall_viii"
]

It will be observable in your playground https://ikatyang.github.io/tree-sitter-yaml/ when you build this YAML grammar against latest tree-sitter-cli@0.16.9.

ikatyang commented 3 years ago

I did not get this error on the current playground, which is compiled using tree-sitter-cli@0.16.7, did I miss something? or is it a tree-sitter-cli@0.16.9-only issue?

char0n commented 3 years ago

Here the problem might be that I'm using latest web-tree-sitter@0.16.4 but you're using web-tree-sitter@0.16.7 that you've build your self ?

ikatyang commented 3 years ago
char0n commented 3 years ago

The solution to our problem was to runtree-sitter generate before running tree-sitter build-wasm. Thanks for pointing me out to the right direction.