Repository navigation
fix: add C++20 flags to binding.gyp for Node.js 24 compatibility - #23
shivansh-engineer wants to merge 1 commit into
Conversation
|
Thanks for the contribution! Unfortunately we can't verify the commit author(s): Shivansh Chaudhary <s***@s***.i***.s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated. |
f74d540 to
876bf18
Compare
|
Thanks for the contribution! Before we can merge this, we need @shivansh-engineer to sign the Salesforce Inc. Contributor License Agreement. |
|
I have signed the CLA. |
|
@salesforce-cla recheck |
The Prerequisites section listed only "Node.js >= 20 and pnpm >= 8", missing the tree-sitter CLI requirement that `pnpm build` needs to generate the parser in `packages/parser-tree-sitter`. New contributors hit "sh: tree-sitter: command not found" with no guidance from the README. Recommends `mise install` as the primary setup path (respects the pinned 0.25.x line in mise.toml) and provides a manual-install fallback that explicitly lists Node 22, pnpm 10, and the tree-sitter CLI 0.25.x. Calls out the macOS Homebrew gotcha: `brew install tree-sitter` ships only the C library; the CLI is a separate `tree-sitter-cli` formula (which currently ships 0.26.x, a minor mismatch with the pin). Addresses #33 Part B (the undocumented CLI prerequisite). Part A (Node 26 compatibility) is covered by #23 and #27. Refs #33
|
Thanks! Closing: this changes our |
Summary
Fixes #7.
Node.js 24 upgraded its V8 headers to require C++20. The
binding.gypinpackages/parser-tree-sitteronly setcflags_cfor the C parser but never setcflags_ccforbinding.cc, causing a hard compile failure on Node 24:```
error: C++20 or later required.
error: unknown type name 'concept'
```
Changes
packages/parser-tree-sitter/binding.gyp: Add C++20 compiler flags for all three platforms — Linux (cflags_cc), macOS (xcode_settings), Windows (msvs_settings)apps/docs/docs/getting-started/installation.md: Add a Troubleshooting section covering this error and the npm package visibility issue (Cannot find pnpm add @agentscript/agentforce in npm #6)The fix follows the same pattern used by
better-sqlite3and other native Node addons that require C++20.