nodejs / gyp-next

A fork of the GYP build system for use in the Node.js projects
BSD 3-Clause "New" or "Revised" License
125 stars 69 forks source link

test: Run tests on Node.js v22 #244

Closed cclauss closed 1 month ago

cclauss commented 2 months ago

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

targos commented 2 months ago

Windows CI is broken by:

targos commented 2 months ago

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

cclauss commented 2 months ago

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

cclauss commented 2 months ago

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

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

cclauss commented 2 months ago

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>
legendecas commented 2 months ago

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

legendecas commented 2 months ago

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

cclauss commented 2 months ago

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

cclauss commented 2 months ago

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

legendecas commented 2 months ago

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

StefanStojanovic commented 1 month ago

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