gyp-next icon indicating copy to clipboard operation
gyp-next copied to clipboard

test: Run tests on Node.js v22

Open cclauss opened this issue 9 months ago • 10 comments

https://nodejs.org/en/blog/announcements/v22-release-announce

cclauss avatar Apr 25 '24 11:04 cclauss

Windows CI is broken by:

  • nodejs/node#52682

targos avatar Apr 25 '24 11:04 targos

For actions/setup-python errors, it seems to be:

  • actions/runner-images#9770

targos avatar Apr 25 '24 11:04 targos

Python issues were fixed by explicitly selecting macos-13 and macos-14 (X64 Intel vs. ARM64 Apple Silicon).

cclauss avatar Apr 25 '24 17:04 cclauss

Win: https://community.chocolatey.org/packages/nodejs

Mac: https://github.com/Homebrew/homebrew-core/pull/169999

cclauss avatar Apr 25 '24 19:04 cclauss

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>

cclauss avatar May 01 '24 04:05 cclauss

node-gyp integration failures are related to: https://github.com/nodejs/nan/issues/968

legendecas avatar May 02 '24 09:05 legendecas

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

legendecas avatar May 02 '24 09:05 legendecas

https://github.com/actions/node-versions/releases/tag/22.1.0-8926142033

cclauss avatar May 02 '24 16:05 cclauss

@legendecas @StefanStojanovic Any idea how we can fix the UnicodeEncodeError so we can land this in

  • #253

cclauss avatar May 08 '24 09:05 cclauss

@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.

legendecas avatar May 08 '24 10:05 legendecas

@cclauss Node.js v22.2 was released, would it make sense to resolve conflicts and try this now without the Windows exclude?

StefanStojanovic avatar May 24 '24 07:05 StefanStojanovic