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

Publish to npm through GitHub Actions #143

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

verhovsky
Copy link
Collaborator

No description provided.

Comment on lines -88 to -91
- if: matrix.os == 'windows-latest'
run: ${{ env.NODE_PREBUILD_CMD }} --arch ia32
- if: matrix.os == 'windows-latest'
run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to prebuild for 32-bit Windows doesn't work for Node 18+. It fails with

prebuild info build Preparing to prebuild tree-sitter@0.20.4 for node 18.0.0 on win32-ia32 using node-gyp
gyp info find Python using Python version 3.7.9 found at "C:\hostedtoolcache\windows\Python\3.7.9\x64\python3.exe"
gyp http GET https://nodejs.org/dist/v18.0.0/node-v18.0.0-headers.tar.gz
gyp http 200 https://nodejs.org/dist/v18.0.0/node-v18.0.0-headers.tar.gz
gyp http GET https://nodejs.org/dist/v18.0.0/SHASUMS256.txt
gyp http GET https://nodejs.org/dist/v18.0.0/win-x86/node.lib
gyp http 200 https://nodejs.org/dist/v18.0.0/SHASUMS256.txt
gyp http 404 https://nodejs.org/dist/v18.0.0/win-x86/node.lib
gyp WARN install got an error, rolling back install
prebuild ERR! configure error 
prebuild ERR! stack Error: 404 status code downloading ia32 node.lib
prebuild ERR! stack     at downloadNodeLib (D:\a\node-tree-sitter\node-tree-sitter\node_modules\node-gyp\lib\install.js:339:15)
prebuild ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
prebuild ERR! stack     at async Promise.all (index 0)
prebuild ERR! stack     at async go (D:\a\node-tree-sitter\node-tree-sitter\node_modules\node-gyp\lib\install.js:266:7)
prebuild ERR! stack     at async install (D:\a\node-tree-sitter\node-tree-sitter\node_modules\node-gyp\lib\install.js:68:18)
prebuild ERR! not ok 
prebuild ERR! build Error: 404 status code downloading ia32 node.lib
prebuild ERR! build     at downloadNodeLib (D:\a\node-tree-sitter\node-tree-sitter\node_modules\node-gyp\lib\install.js:339:15)
prebuild ERR! build     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
prebuild ERR! build     at async Promise.all (index 0)
prebuild ERR! build     at async go (D:\a\node-tree-sitter\node-tree-sitter\node_modules\node-gyp\lib\install.js:266:7)
prebuild ERR! build     at async install (D:\a\node-tree-sitter\node-tree-sitter\node_modules\node-gyp\lib\install.js:68:18)

which is saying there's no release file for Node 18 for 32-bit Windows. There is one for Node 20 https://nodejs.org/dist/v20.0.0/ and Node still ostensibly supports 32-bit Windows nodejs/node#42543 but I say instead of adding a separate

  NODE_32_BIT_WINDOWS_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 20.0.0 --strip -u ${{ secrets.GH_TOKEN }}

we just stop prebuilding node-tree-sitter for 32-bit Windows, just 64-bit.

@verhovsky verhovsky merged commit 41d6ded into tree-sitter:master Jul 3, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant