tree-sitter / node-tree-sitter

Node.js bindings for tree-sitter
https://www.npmjs.com/package/tree-sitter
MIT License
649 stars 114 forks source link

Support Electron 13+ on Windows #151

Closed verhovsky closed 1 year ago

verhovsky commented 1 year ago

Closes #90, follow up to #95

verhovsky commented 1 year ago

@selfint as you pointed out

Both _MSC_VER and NODE_RUNTIME_ELECTRON were not set, and I couldn't figure out how to set them.

NODE_RUNTIME_ELECTRON was not being set so the code in the #if never ran, and it had some typos and whatever so it didn't work even after fixing the #if.

verhovsky commented 1 year ago

For reference: I saw the changes in native/cocos/bindings/jswrapper/v8/Object.cpp in https://github.com/cocos/cocos-engine/pull/13394 which I found with https://sourcegraph.com/search?q=context:global+lang:C%2B%2B+node::Buffer::New&patternType=standard&sm=1&groupBy=repo

verhovsky commented 1 year ago

The CI is able to prebuild node-tree-sitter for all platforms finally, but I don't know how to actually test if what it builds works. I don't have a Windows computer and for @selfint's test repo https://github.com/selfint/vscode-tree-sitter/ the CI fails to run yarn add -D windows-build-tools so it fails before it starts actually compiling or testing the code

selfint commented 1 year ago

The CI is able to prebuild node-tree-sitter for all platforms finally, but I don't know how to actually test if what it builds works. I don't have a Windows computer and for @selfint's test repo https://github.com/selfint/vscode-tree-sitter/ the CI fails to run yarn add -D windows-build-tools so it fails before it starts actually compiling or testing the code

Ci on windows now works (still crashes, but the build steps work).

New & simpler test repo: https://github.com/selfint/test-node-tree-sitter