ci: drop redundant NodeGYP install step#789
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
| restore-keys: | | ||
| ${{ runner.os }}-yarn- | ||
| - name: Install NodeGYP | ||
| - name: Install NodeGYP |
Contributor
There was a problem hiding this comment.
on a 2nd thought, we should remove this NodeGYP installation step because it's intended for a fallback way to build some native C/C++ addons. Can we try remove this step entirely?
The unit-test matrix had a step that ran `yarn global add node-gyp` for Node 20.19, 22.11, and 24.11. This started failing on every PR and on main once node-gyp@13 released, because node-gyp@13 pulls proc-log@7.0.0, which declares engines as ^22.22.2 || ^24.15.0 || >=26.0.0 -- rejecting every Node version in our matrix. Rather than pin around the upstream churn, drop the step. node-gyp is only needed as a fallback to compile native addons at install time, and the modern npm bundled with Node 20+ already ships its own node-gyp for that purpose. The 18.12 matrix entry has never run this step and installs cleanly, which is evidence the global install was already redundant. If a future native dependency genuinely needs node-gyp on a specific Node version, we can reintroduce it with an explicit pin scoped to that need.
0a7a3d9 to
5a2d2a2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the
Install NodeGYPstep from the unit-test matrix in.github/workflows/build.yml.Why
Symptom
Every PR and
mainbuild was failing onInstall NodeGYPwith:Root cause
node-gyp@13.0.0bumped its transitive dependency onproc-logfrom^6to^7.proc-log@7.0.0tightened itsengines.nodedeclaration from^20.17.0 || >=22.9.0to^22.22.2 || ^24.15.0 || >=26.0.0. None of the Node versions in our CI matrix satisfy the new constraint:proc-log@7engines?Why drop rather than pin
node-gypis a fallback tool used to compile native C/C++ addons from source at install time when no prebuilt binary is available. Two reasons this global install step is no longer earning its keep:npmbundled with Node 20+ already ships its ownnode-gypand uses it automatically when a native build is needed. Installing one globally is redundant.18.12matrix entry has never run this step (the conditional excludes it) andyarn installsucceeds there. That's direct evidence the global install isn't required for the current dep tree.If a future native dependency genuinely needs a specific
node-gypon a specific Node version, we can reintroduce a scoped, pinned step then.Alternatives considered
node-gyp@12(which usesproc-log@^6): works but treats a symptom rather than the underlying redundancy.--ignore-enginesflag: silently masks engine mismatches in the future.Scope
CI-only change. No runtime/source code touched.
Test plan
yarn installandyarn build, which is where any missing-native-binary fallout would surface).lintandbuild (...)jobs are unaffected.