Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio Code extension #42

Open
qarlosalberto opened this issue May 17, 2020 · 3 comments
Open

Visual Studio Code extension #42

qarlosalberto opened this issue May 17, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@qarlosalberto
Copy link

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?

@drom
Copy link
Collaborator

drom commented May 18, 2020

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

@qarlosalberto
Copy link
Author

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: microsoft/vscode#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

@drom
Copy link
Collaborator

drom commented May 21, 2020

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 drom added the enhancement New feature or request label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants