gyp-next
gyp-next copied to clipboard
test: Run tests on Node.js v22
https://nodejs.org/en/blog/announcements/v22-release-announce
Windows CI is broken by:
- nodejs/node#52682
For actions/setup-python errors, it seems to be:
- actions/runner-images#9770
Python issues were fixed by explicitly selecting macos-13
and macos-14
(X64 Intel vs. ARM64 Apple Silicon).
Win: https://community.chocolatey.org/packages/nodejs
Mac: https://github.com/Homebrew/homebrew-core/pull/169999
https://github.com/npm/cli/releases/tag/v10.7.0 in GitHub Actions:
- uses: actions/setup-node@v4
with:
node-version: 22.x
- if: runner.os == 'Windows'
shell: bash # Not pwsh!!!
run: |
npm --version # 10.5.1
npm install -g npm # >= https://github.com/npm/cli/releases/tag/v10.7.0
npm --version # 10.7.0
Now the tests fail further down in Python code…
File "C:\hostedtoolcache\windows\Python\3.12.3\x64\Lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u012b' in position 3: character maps to <undefined>
node-gyp integration failures are related to: https://github.com/nodejs/nan/issues/968
The codecs.charmap_encode
error outputs are noises as it is used to skip tests: https://github.com/nodejs/node-gyp/blob/main/test/test-addon.js#L59
https://github.com/actions/node-versions/releases/tag/22.1.0-8926142033
@legendecas @StefanStojanovic Any idea how we can fix the UnicodeEncodeError
so we can land this in
- #253
@cclauss the unicode error is unrelevant, see https://github.com/nodejs/gyp-next/pull/244#issuecomment-2090011082. The real error is caused by https://github.com/nodejs/node/pull/52794, which should be released in the next week's new v22 version.
@cclauss Node.js v22.2 was released, would it make sense to resolve conflicts and try this now without the Windows exclude?