tree-sitter-verilog icon indicating copy to clipboard operation
tree-sitter-verilog copied to clipboard

Visual Studio Code extension

Open qarlosalberto opened this issue 5 years ago • 3 comments

Hi,

I'm developing a extension for vscode and I'm using tree-sitter-verilog. I have a lot of problems with the NODE_MODULE_VERSION:

Activating extension 'teros-technology.teroshdl' failed: The module '/home/carlos/repo/colibri/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 75. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`)..

If I want to use tree-sitter-verilog, can my extension only run in a specific version of Visual Studio Code cause of the nodejs version?

qarlosalberto avatar May 17 '20 19:05 qarlosalberto

What is the Node, Electron version you are running under VSCode?

drom avatar May 18 '20 02:05 drom

For VSCode: electron 7.2.4 and node 12.8.1

I have see that there is a big problem with VSCode an native modules: https://github.com/microsoft/vscode/issues/658

It could be a solution to generate a .wasm language file for tree-sitter-verilog and to use tree-sitter-web? https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web#generate-wasm-language-files

This extension use it: https://github.com/georgewfraser/vscode-tree-sitter/tree/master/parsers

qarlosalberto avatar May 18 '20 12:05 qarlosalberto

Yes, WASM looks like a promising solution. Here are my experiments https://observablehq.com/@drom/tree-sitter with web-tree-sitter and https://github.com/chipsalliance/tree-sitter-firrtl I can generate WASM file.

drom avatar May 21 '20 02:05 drom