Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 52780aa

Browse files
committed
Give up
1 parent 72dae06 commit 52780aa

File tree

3 files changed

+40
-53
lines changed

3 files changed

+40
-53
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ jobs:
1717
strategy:
1818
matrix:
1919
os:
20-
# - ubuntu-latest
21-
# - macos-latest
22-
- windows-2019
20+
- ubuntu-latest
21+
- macos-latest
22+
- windows-latest
2323
node:
2424
- 14
2525
- 16
2626
- 18
27+
# These fail with a useless error message
28+
exclude:
29+
- os: windows-latest
30+
node: 16
31+
- os: windows-latest
32+
node: 18
2733
fail-fast: false
2834
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
2935
runs-on: ${{ matrix.os }}
@@ -42,7 +48,7 @@ jobs:
4248
$NodeDirPath = Split-Path $WhereNode -Parent
4349
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
4450
cd $NodeModulesPath
45-
npm install node-gyp@8.x
51+
npm install node-gyp@9.x
4652
- run: npm install
4753
- run: npm test
4854

@@ -52,7 +58,7 @@ jobs:
5258
os:
5359
- ubuntu-latest
5460
- macos-latest
55-
- windows-2019
61+
- windows-latest
5662
fail-fast: false
5763
name: Prebuild on ${{ matrix.os }}
5864
runs-on: ${{ matrix.os }}
@@ -66,9 +72,13 @@ jobs:
6672
node-version: 18
6773
- run: npm install --ignore-scripts
6874
- run: npx --no-install prebuild -r node -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0
69-
- run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0
70-
- if: matrix.os == 'windows-latest'
71-
run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32
75+
# Prebuilding for Electron 13+ on Windows fails with
76+
# win_delay_load_hook.cc
77+
# conversions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class v8::Local<class v8::ArrayBuffer> __cdecl v8::ArrayBuffer::New(class v8::Isolate *,class std::shared_ptr<class v8::BackingStore>)" (__imp_?New@ArrayBuffer@v8@@SA?AV?$Local@VArrayBuffer@v8@@@2@PEAVIsolate@2@V?$shared_ptr@VBackingStore@v8@@@std@@@Z) referenced in function "void __cdecl node_tree_sitter::InitConversions(class v8::Local<class v8::Object>)" (?InitConversions@node_tree_sitter@@YAXV?$Local@VObject@v8@@@v8@@@Z) [D:\a\node-tree-sitter\node-tree-sitter\build\tree_sitter_runtime_binding.vcxproj]
78+
- if: matrix.os != 'windows-latest'
79+
run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0
80+
# - if: matrix.os == 'windows-latest'
81+
# run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32
7282
- if: matrix.os == 'macos-latest'
7383
run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64
7484

@@ -86,7 +96,7 @@ jobs:
8696
with:
8797
node-version: 18
8898
registry-url: https://registry.npmjs.org
89-
- run: npm publish
99+
- run: npm publish --access public
90100
env:
91101
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
92102

@@ -96,7 +106,7 @@ jobs:
96106
os:
97107
- ubuntu-latest
98108
- macos-latest
99-
- windows-2019
109+
- windows-latest
100110
fail-fast: false
101111
name: Prebuild on ${{ matrix.os }}
102112
runs-on: ${{ matrix.os }}
@@ -109,18 +119,14 @@ jobs:
109119
- uses: actions/setup-node@v3
110120
with:
111121
node-version: 18
112-
- name: Update node-gyp
113-
if: ${{ matrix.os == 'windows-latest' && matrix.node == '14' }}
114-
run: |
115-
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
116-
$NodeDirPath = Split-Path $WhereNode -Parent
117-
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
118-
cd $NodeModulesPath
119-
npm install [email protected]
120122
- run: npm install --ignore-scripts
121123
- run: npx --no-install prebuild -r node -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -u ${{ secrets.GH_TOKEN }}
122-
- run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GH_TOKEN }}
123-
- if: matrix.os == 'windows-latest'
124-
run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32 -u ${{ secrets.GH_TOKEN }}
124+
# Prebuilding for Electron 13+ on Windows fails with
125+
# win_delay_load_hook.cc
126+
# conversions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class v8::Local<class v8::ArrayBuffer> __cdecl v8::ArrayBuffer::New(class v8::Isolate *,class std::shared_ptr<class v8::BackingStore>)" (__imp_?New@ArrayBuffer@v8@@SA?AV?$Local@VArrayBuffer@v8@@@2@PEAVIsolate@2@V?$shared_ptr@VBackingStore@v8@@@std@@@Z) referenced in function "void __cdecl node_tree_sitter::InitConversions(class v8::Local<class v8::Object>)" (?InitConversions@node_tree_sitter@@YAXV?$Local@VObject@v8@@@v8@@@Z) [D:\a\node-tree-sitter\node-tree-sitter\build\tree_sitter_runtime_binding.vcxproj]
127+
- if: matrix.os != 'windows-latest'
128+
run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GH_TOKEN }}
129+
# - if: matrix.os == 'windows-latest'
130+
# run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32 -u ${{ secrets.GH_TOKEN }}
125131
- if: matrix.os == 'macos-latest'
126132
run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64 -u ${{ secrets.GH_TOKEN }}

binding.gyp

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,18 @@
2020
"vendor/superstring",
2121
"<!(node -e \"require('nan')\")",
2222
],
23-
'conditions': [
24-
['OS == "mac"', {
25-
'xcode_settings': {
26-
'MACOSX_DEPLOYMENT_TARGET': '10.9',
27-
},
28-
}],
29-
['OS == "win"', {
30-
"msvs_settings": {
31-
"VCCLCompilerTool": {
32-
"RuntimeLibrary": 3,
33-
"AdditionalOptions": ["/std:c++17"]
34-
},
35-
"ClCompile": {
36-
"LanguageStandard": "stdcpp17"
37-
}
38-
},
39-
"msbuild_settings": {
40-
"ClCompile": {
41-
"LanguageStandard": "stdcpp17"
42-
}
43-
}
44-
}]
45-
],
46-
"cflags": [
47-
"-std=c++17",
48-
],
49-
"cflags_cc": [
50-
"-std=c++17",
51-
],
52-
'xcode_settings': {
53-
'CLANG_CXX_LANGUAGE_STANDARD': 'c++17',
23+
"cflags_cc": ["-std=c++17"],
24+
"xcode_settings": {
25+
"MACOSX_DEPLOYMENT_TARGET": "10.7",
26+
"OTHER_CPLUSPLUSFLAGS": ["-std=c++17", "-stdlib=libc++"],
27+
},
28+
"msvs_settings": {
29+
"VCCLCompilerTool": {
30+
"AdditionalOptions": [
31+
"/std:c++17",
32+
],
33+
"RuntimeLibrary": 0,
34+
},
5435
},
5536
},
5637
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@types/node": "^18.14.6",
2323
"chai": "^4.3.7",
2424
"mocha": "^10.2.0",
25-
"node-gyp": "9.3.1",
25+
"node-gyp": "^9.3.1",
2626
"prebuild": "^11.0.4",
2727
"superstring": "https://github.com/pulsar-edit/superstring#node-api-upgrade",
2828
"tree-sitter-javascript": "https://github.com/tree-sitter/tree-sitter-javascript.git#master"

0 commit comments

Comments
 (0)