Published v1.6.2 still fails to index C++ operator++ references on Windows (related to #2482 / #2769)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
失敗する正規表現は lib/dist/resolution/name-matcher.js の 10334 行付近にある cppParenListAfter で構築されており、new RegExp の前に ~ だけがエスケープされています。ソースに #2769 の修正がすでに含まれているか確認し、そのうえで演算子名の正規表現メタ文字をすべてエスケープしてください(例:+)。operator++ を含む C++ ファイルで、'Nothing to repeat' エラーを出さずに参照解決が 14% を超えれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
CodeGraph 1.6.2 fails during reference resolution with an invalid regular expression involving operator++. This prevents my project from being fully indexed.
I found #2482 and the fix merged in #2769. My installed npm package still contains the unescaped operator-name handling. Could you confirm which published release includes the fix, or recommend a supported workaround until it is released?
Environment
- OS: Windows, x64
- Shell: PowerShell
- Package:
@colbymchenry/codegraph - Installed version: 1.6.2
- Installation:
npm install -g @colbymchenry/codegraph - System Node.js: v26.13.0
- CodeGraph's bundled Node.js: v24.16.0
The MCP server connects successfully through Magpie. The indexing failure also happens directly in the CLI, independently of MCP calls.
Steps to reproduce on my project
- Install the npm package.
- Open PowerShell in the project root.
- Run:
codegraph.cmd init - Scanning finds 41,050 files.
- Parsing completes, but reference resolution fails at approximately 14%.
- Running
codegraph.cmd indexalso fails with the same regex error.
Actual output
Initialized in <project-root>
Scanning files — 41,050 found
Parsing code — done
Resolving refs — 14%
Failed: Invalid regular expression: /\boperator++\s*(?:<[^<>()]*>)?\s*\(/: Nothing to repeat
Re-indexing reports:
Failed to index: Invalid regular expression: /\boperator++\s*(?:<[^<>()]*>)?\s*\(/: Nothing to repeat
After the failed initialization, running init again says:
Already initialized in <project-root>
Use "codegraph index" to re-index or "codegraph sync" to update
This message does not make it clear that the initial indexing did not finish.
Expected behavior
- Operator names containing regex metacharacters should not crash reference resolution.
- Indexing should complete for supported source files.
- A failed initial index should be clearly distinguishable from a successfully indexed project.
Relevant installed code
In the installed Windows platform package:
lib/dist/resolution/name-matcher.js, line 10334, inside cppParenListAfter:
const at = new RegExp(`\\b${name.replace(/[~]/g, '\\$&')}\\s*(?:<[^<>()]*>)?\\s*\\(`).exec(text.slice(column));
This escapes ~ only, leaving the + characters in operator++ unescaped.
Impact
This blocks CodeGraph indexing for my project. An incomplete index is left behind, so I cannot rely on it for complete code relationships.
Related: #2482, #2457, #2769.
- 主要言語
- C
- スター
- 73.2k
- フォーク
- 4.7k
- 平均マージ
- 3時間 39分
- マージ済み PR(30日)
- 528
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
colbymchenry/codegraph のほかの issue
-
A `../` entry in package.json `workspaces` makes a folder outside the project count as a workspace package, and a call gets linked to the wrong function対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
colbymchenry/codegraph#3093 ·
メンテナーはふだん 1 日以内に返信
-
Windows: npm-shim spawnSync missing windowsHide flashes a console window on every MCP server launchオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
colbymchenry/codegraph#3054 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
colbymchenry/codegraph#2974 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
colbymchenry/codegraph#2959 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
colbymchenry/codegraph#1900 · コメント 2 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
colbymchenry/codegraph の issue をすべて見る
似ている issue
-
難易度 2/5 半日 初心者へのやさしさ 72/100
vercel-labs/scriptc#2910 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
darktable-org/darktable#22939 ·
メンテナーはふだん 1 日以内に返信
-
os: input_password leaves terminal echo disabled when reading fails対応中かも @davlgd が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
armv7l: `close`, `unlink` and `chroot` pass the kernel their argument's address対応中かも @aoinoikaz が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
arduino/ArduinoCore-megaavr#152 ·