Skip to content

Verify the MinGW node-gyp fix in CI and guard against regressions - #7

Merged
urbanogilson merged 1 commit into
mainfrom
ci/fix-mingw-node-gyp
Aug 3, 2026
Merged

Verify the MinGW node-gyp fix in CI and guard against regressions#7
urbanogilson merged 1 commit into
mainfrom
ci/fix-mingw-node-gyp

Conversation

@urbanogilson

@urbanogilson urbanogilson commented Aug 3, 2026

Copy link
Copy Markdown
Member

MSYS2's mingw-w64-x86_64-nodejs ships an npm whose bundled node-gyp is patched for MinGW (-f make, node_root_dir=/mingw64, node_lib_file=libnode.dll.a). A local node_modules/node-gyp shadows it — node-gyp-build resolves via require.resolve('node-gyp/package.json'), and scripts.build/scripts.test pick up node_modules/.bin/node-gyp from PATH. Unpatched node-gyp then selects -f msvs + MSBuild and feeds libffi's GNU-syntax deps/libffi/src/x86/win64.S to MASM: hundreds of error A2044: invalid character in file.

The pinned node-gyp devDependency (added so the MSVC jobs can detect
VS2026) shadows the MSYS2-patched node-gyp under MinGW, which makes
node-gyp build with MSBuild/MASM instead of `-f make` and fails on
libffi's GNU-syntax win64.S. The MinGW job already drops that pin, but
the push trigger ignored `.github/**`, so that fix never actually ran.

- Stop ignoring `.github/**` on push and add workflow_dispatch, so
  workflow-only changes are validated instead of silently skipped.
- Assert no local node-gyp survives `npm install` in the MinGW job, so a
  regression fails immediately rather than as hundreds of A2044 errors.
- Document why the pin removal must precede `npm install` and why this
  job cannot use `npm ci`.
@urbanogilson
urbanogilson force-pushed the ci/fix-mingw-node-gyp branch from 0091ec8 to c0ab11a Compare August 3, 2026 21:04
@urbanogilson
urbanogilson merged commit 4099ba6 into main Aug 3, 2026
15 checks passed
@urbanogilson
urbanogilson deleted the ci/fix-mingw-node-gyp branch August 3, 2026 21:16
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