node-tree-sitter: Electron 13 build failure
Anyone tried to build for Electron 13?
Trying it with prebuild -r electron -t 13.0.1
leads to errors such as
tree-sitter\src\node.cc(32,129): error C2661: 'v8::ArrayBuffer::New': no overloaded function takes 3 arguments
tree-sitter\src\node.cc(36,42): error C3536: 'js_transfer_buffer': cannot be used before it is initialized
tree-sitter\src\node.cc(36,69): error C2665: 'v8::Uint32Array::New': none of the 2 overloads could convert all the argument types
I’m aware of #83, and the problems described above happen after changing binding.gyp
to following
"cflags": [
"-std=c++17",
],
'xcode_settings': {
'CLANG_CXX_LANGUAGE_STANDARD': 'c++17',
},
This does not happen when building for other versions of electron or node.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 25 (3 by maintainers)
Hi, I suggest to use WASM version, like what I have done: https://github.com/Symbolk/somanyconflicts
Please let me know if you end up with a reasonably clean solution.
This blog post contains an interesting deep dive into a similar issue that the author encountered when moving to chromium 90.0.4415.0. It seems Electron 13 was the first version to use a version of chromium greater than or equal to that. Their ultimate suggestion is similar to @gpetrov’s (use NAPI).
Hi, any update on this?
Happy new year guys @sergei-dyshel When I use your repo for my vscode extension, I can rebuild modules for electron 13 But at runtime, VSCode says there is a symbol lookup error concerning
v8::ArrayBuffer::New(v8::Isolate*, std::shared_ptr<v8::BackingStore>)
(undefined).nm
says it’s not defined too, but I guess that’s OK as it seems VSCode loads libraries at runtime (there are a lot of undefined symbols from v8 at this point). Also, note that nm does not know a candidate library to look for the symbol in:ldd
does not mention anything aboutlibv8
orlibnode.a
:Anyone has experienced this before? Any help is much appreciated as it’s driving me crazy 😄
ArrayBuffer
API changed in newer V8 version, I have a fix in https://github.com/sergei-dyshel/node-tree-sitter/commit/961870e07d395c8000a27051b01e01d6cecf7e9b.