Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ Interactive terminal controls are allowed only when stdout is not redirected or

### C# / .NET integration

`SolutionProjectResolver` parses the plain-text `.sln` `Project(...) = "...", "...csproj"` entries with a non-regex parser and resolves C# / F# / VB project files. Project entries that normalize outside the active workspace root are ignored before filesystem probing or path-filter evaluation. Solution parsing rejects `.sln` files above 8 MiB, lines above 16,384 characters, and more than 4096 .NET project references with clear diagnostics. When exactly one `.sln` exists at the workspace root, `--project <name|path>` uses it automatically; otherwise callers can pass `--solution <path>`.
`SolutionProjectResolver` parses the plain-text `.sln` `Project(...) = "...", "...csproj"` entries with a non-regex parser and resolves C# / F# / VB project files. Project entries that normalize outside the active workspace root are ignored before filesystem probing or path-filter evaluation. Solution parsing rejects `.sln` files above 8 MiB, lines above 16,384 characters, and more than 4096 .NET project references with clear diagnostics. Automatic root-level `.sln` discovery samples at most 128 candidates before sorting and reports a clear error when that cap is exceeded, so callers should pass `--solution <path>` in solution-heavy workspaces. When exactly one `.sln` exists at the workspace root within that cap, `--project <name|path>` uses it automatically; otherwise callers can pass `--solution <path>`. Fallback project discovery caps traversal at 4096 directories and 65,536 files with a clear `--solution <path>` recovery hint. Fallback project discovery and project-file expansion use long-path-safe per-directory enumeration, skip unreadable subtrees, and include bounded traversal diagnostics when a project filter cannot be resolved.

Query commands that accept path filters (`search`, `definition`, `references`, `callers`, `callees`, `symbols`, `files`, `find`, `map`, `inspect`, `deps`, `impact`, `unused`, `hotspots`, and `validate`) expand `--project` into the matching project directory glob before hitting `DbReader`, so all existing SQL path predicates keep working. `index --project` expands to the files under the selected project directory and reuses the existing `--files` update path.
Query commands that accept path filters (`search`, `definition`, `references`, `callers`, `callees`, `symbols`, `files`, `find`, `map`, `inspect`, `deps`, `impact`, `unused`, `hotspots`, and `validate`) expand `--project` into the matching project directory glob before hitting `DbReader`, so all existing SQL path predicates keep working. `index --project` expands to the files under the selected project directory and reuses the existing `--files` update path, but rejects expansions above 65,536 files for one project or 131,072 unique files across all requested projects with an explicit-files recovery hint.

`cdidx batch` is a CLI-side query loop for editor integrations and scripts that need several query commands against the same DB without spawning `cdidx` repeatedly. It opens one `DbContext` / `DbReader`, reads newline-delimited JSON string arrays from stdin, and dispatches only query commands through the existing `QueryCommandRunner` paths so output and validation stay identical to the standalone command shape.

Expand Down Expand Up @@ -2344,9 +2344,9 @@ override が文書化されていない限り ANSI/progress control を抑止す

### C# / .NET 連携

`SolutionProjectResolver` は plain-text の `.sln` に含まれる `Project(...) = "...", "...csproj"` 行を non-regex parser で読み、C# / F# / VB の project file を解決する。active workspace root の外側へ正規化される project entry は、filesystem probe や path-filter 評価の前に無視する。solution parsing は 8 MiB を超える `.sln`、16,384 文字を超える行、4096 件を超える .NET project reference を明確な diagnostic とともに拒否する。workspace root に `.sln` が 1 つだけある場合、`--project <name|path>` は自動でそれを使う。複数ある場合は caller が `--solution <path>` を渡せる。
`SolutionProjectResolver` は plain-text の `.sln` に含まれる `Project(...) = "...", "...csproj"` 行を non-regex parser で読み、C# / F# / VB の project file を解決する。active workspace root の外側へ正規化される project entry は、filesystem probe や path-filter 評価の前に無視する。solution parsing は 8 MiB を超える `.sln`、16,384 文字を超える行、4096 件を超える .NET project reference を明確な diagnostic とともに拒否する。root 直下の `.sln` 自動検出は sort 前に最大 128 candidates で打ち切り、その上限を超えた場合は明確な error を返すため、solution が多い workspace では `--solution <path>` を渡す。上限内で workspace root に `.sln` が 1 つだけある場合、`--project <name|path>` は自動でそれを使う。複数ある場合は caller が `--solution <path>` を渡せる。fallback project discovery は 4096 directories / 65,536 files で traversal を打ち切り、`--solution <path>` を示す明確な recovery hint を返す。fallback project discovery と project-file expansion は long-path-safe な per-directory 列挙を使い、読めない subtree を skip し、project filter を解決できない場合は bounded traversal diagnostics を含める

path filter を受け付ける query コマンド(`search`, `definition`, `references`, `callers`, `callees`, `symbols`, `files`, `find`, `map`, `inspect`, `deps`, `impact`, `unused`, `hotspots`, `validate`)は、`--project` を対応する project directory glob に展開してから `DbReader` に渡す。これにより既存の SQL path predicate をそのまま利用できる。`index --project` は選択された project directory 配下のファイルに展開し、既存の `--files` 更新経路を再利用する。
path filter を受け付ける query コマンド(`search`, `definition`, `references`, `callers`, `callees`, `symbols`, `files`, `find`, `map`, `inspect`, `deps`, `impact`, `unused`, `hotspots`, `validate`)は、`--project` を対応する project directory glob に展開してから `DbReader` に渡す。これにより既存の SQL path predicate をそのまま利用できる。`index --project` は選択された project directory 配下のファイルに展開し、既存の `--files` 更新経路を再利用する。ただし 1 project で 65,536 files、requested projects 全体で 131,072 unique files を超える展開は拒否し、明示的な `--files` を使う recovery hint を返す。

`cdidx batch` は、同じ DB に複数の query command を投げる editor integration や script 向けの CLI 側 query loop である。1 つの `DbContext` / `DbReader` を開き、stdin から newline-delimited JSON 文字列配列を読み、query command だけを既存の `QueryCommandRunner` 経路へ dispatch するため、出力と validation は単発コマンドと同じ形を保つ。

Expand Down
17 changes: 17 additions & 0 deletions changelog.d/unreleased/3065.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
category: fixed
issues:
- 3065
affected:
- src/CodeIndex/Cli/SolutionProjectResolver.cs
- tests/CodeIndex.Tests/IndexCommandRunnerTests.cs
- DEVELOPER_GUIDE.md
---

## English

- **Automatic solution discovery now caps root `.sln` candidates before sorting (#3065)** — workspaces with more than 128 root-level solution files now get a clear `--solution <path>` diagnostic instead of materializing and sorting an unbounded candidate list.

## 日本語

- **自動 solution 検出が root 直下の `.sln` candidate を sort 前に上限管理するようになりました (#3065)** — root 直下の solution file が 128 件を超える workspace では、無制限に materialize / sort せず、`--solution <path>` を促す明確な diagnostic を返します。
17 changes: 17 additions & 0 deletions changelog.d/unreleased/3066.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
category: fixed
issues:
- 3066
affected:
- src/CodeIndex/Cli/SolutionProjectResolver.cs
- tests/CodeIndex.Tests/IndexCommandRunnerTests.cs
- DEVELOPER_GUIDE.md
---

## English

- **`index --project` now caps materialized project-file targets (#3066)** — project expansion rejects more than 65,536 files for one project or 131,072 unique files across requested projects and points users to explicit `--files` input.

## 日本語

- **`index --project` が materialize する project-file targets を上限管理するようになりました (#3066)** — project expansion は 1 project で 65,536 files、requested projects 全体で 131,072 unique files を超える場合に拒否し、明示的な `--files` 入力を案内します。
17 changes: 17 additions & 0 deletions changelog.d/unreleased/3213.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
category: fixed
issues:
- 3213
affected:
- src/CodeIndex/Cli/SolutionProjectResolver.cs
- tests/CodeIndex.Tests/IndexCommandRunnerTests.cs
- DEVELOPER_GUIDE.md
---

## English

- **SolutionProjectResolver fallback discovery now caps traversal work (#3213)** — fallback project discovery stops after 4096 directories or 65,536 files and reports a clear `--solution <path>` recovery hint instead of walking unbounded workspace trees.

## 日本語

- **SolutionProjectResolver の fallback discovery が traversal 作業を上限管理するようになりました (#3213)** — fallback project discovery は 4096 directories または 65,536 files で停止し、workspace tree を無制限に走査せず `--solution <path>` を示す明確な recovery hint を返します。
17 changes: 17 additions & 0 deletions changelog.d/unreleased/3214.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
category: fixed
issues:
- 3214
affected:
- src/CodeIndex/Cli/SolutionProjectResolver.cs
- tests/CodeIndex.Tests/IndexCommandRunnerTests.cs
- DEVELOPER_GUIDE.md
---

## English

- **Solution project fallback traversal now handles long paths and per-directory failures (#3214)** — project discovery and expansion use long-path-safe enumeration, skip unreadable subtrees, and report bounded traversal diagnostics when a project filter cannot be resolved.

## 日本語

- **solution project fallback traversal が long path と directory 単位の失敗を扱うようになりました (#3214)** — project discovery / expansion は long-path-safe な列挙を使い、読めない subtree を skip し、project filter を解決できない場合は bounded traversal diagnostics を返します。
Loading
Loading