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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
### [Unreleased]

#### Fixed
- **C# phantom local `const` and qualified call-site function symbols are now filtered from symbol extraction (#496)** — `SymbolExtractor` now applies the existing column-aware C# type-body gate to field-like `function` rows (`const` / `static readonly`) so local declarations such as `const string content = "hello";` no longer leak into `symbols`, `definition`, or `outline`. It also rejects C# declaration candidates whose captured return-type fragment ends in an operator/contextual suffix, preventing qualified call arguments like `elapsed < TimeSpan.FromSeconds(10)` from surfacing phantom `function FromSeconds` rows. Added a focused regression that locks both repros. Affected: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`. Closes #496.
- **C# verbatim-identifier return types no longer get dropped by the #496 suffix guard (#782)** — `HasInvalidCSharpReturnTypeSuffix` now recognizes real C# verbatim identifiers before rejecting contextual-keyword tails, so declarations such as `public @new Make() => new @new();` remain visible in `symbols` and `outline` while the `elapsed < TimeSpan.FromSeconds(...)` phantom-call-site filter stays intact. Added a focused regression for the verbatim return-type repro. Affected: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`. Closes #782.
- **C# contextual-keyword type names like `await` / `yield` no longer get dropped by the #496 suffix guard (#785)** — `HasInvalidCSharpReturnTypeSuffix` now keeps legal contextual-identifier type names while still rejecting truly invalid statement/operator tails, so members such as `public await MakeAwait()` and `public yield MakeYield()` remain visible in `symbols`, `definition`, and `outline`. Added a focused regression covering both contextual-keyword return types. Affected: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`. Closes #785.
- **C# parenthesized LINQ clause guard no longer mistakes local `const` identifiers for cast targets (#624)** — `ReferenceExtractor` now treats typed local `const` declarations as in-scope value names for the cast-close disambiguation path, so parenthesized `orderby` expressions such as `(READY)` and `(Select)` no longer suppress the real trailing `select(...)` clause solely because the identifier casing looks type-like. Real casts like `(CustomType)select(items)` still keep the clause blocked. Added focused extractor and CLI `references --exact-name --json` regressions for the uppercase-constant repro, and the existing keyword-named-constant regression now passes against the built binary again. Affected: `src/CodeIndex/Indexer/ReferenceExtractor.cs`, `tests/CodeIndex.Tests/ReferenceExtractorTests.cs`, `tests/CodeIndex.Tests/QueryCommandRunnerTests.cs`, `CHANGELOG.md`. Closes #624.
- **Installer jq-version detection test now uses a real PATH stub instead of a bash function shim (#774)** — `InstallScriptTests.ResolveVersion_UsesJqWhenAvailable` now creates an executable `jq` stub under a temporary directory and prepends that directory to `PATH`, so CI reliably exercises the `command -v jq` branch without depending on bash function lookup details or the runner's preinstalled tools. This keeps the installer's jq-preferring path covered while avoiding spurious stderr on GitHub Actions. Affected: `tests/CodeIndex.Tests/InstallScriptTests.cs`, `CHANGELOG.md`. Closes #774.
- **Java same-line annotations, enum-constant body overrides, and record compact constructors now extract correctly (#221, #751, #755)** — `SymbolExtractor` now strips leading same-line Java annotations with the existing lexer-aware scanner instead of a flat `[^)]*` regex prefix, so declarations such as `@Label(")") public int broken()`, `@SuppressWarnings({"unchecked"}) public int first() { ... }`, and annotated `record` headers survive string/comment/paren/brace edge cases. The extractor also emits record compact constructors in both same-line (`public Range { ... }`) and Allman-style (`public Range` followed by next-line `{`) layouts, preserves anonymous enum-member body ranges so overrides like `ADD { @Override public int apply(...) { ... } }` attach to the enum constant container, keeps same-line Java brace-bodied siblings separate (`int first() { ... } int second() { ... }`) instead of swallowing later methods into the first signature, and now restarts same-line Java scanning after enum constants so methods inside `A { @Override int f() { ... } int g() { ... } }` also reach the symbol table. Added focused Java regressions for the reported repros plus the enum-member body range contract. Affected: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`. Closes #221. Closes #751. Closes #755.
Expand Down Expand Up @@ -819,6 +822,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
### [Unreleased]

#### 修正
- **C# の phantom なローカル `const` と qualified call-site `function` シンボルが symbol extraction から除外されるよう修正 (#496)** — `SymbolExtractor` は既存の列単位 C# type-body gate を field-like な `function` 行(`const` / `static readonly`)にも適用するようになり、`const string content = "hello";` のようなローカル宣言が `symbols` / `definition` / `outline` へ漏れなくなった。さらに、捕捉した戻り値断片が演算子または contextual suffix で終わる C# 宣言候補も拒否するため、`elapsed < TimeSpan.FromSeconds(10)` のような qualified call 引数から phantom な `function FromSeconds` 行が出なくなる。両 repro を固定する focused regression test も追加。対象: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`。Closes #496。
- **C# の verbatim identifier 戻り値型が #496 の suffix guard で落ちなくなるよう修正 (#782)** — `HasInvalidCSharpReturnTypeSuffix` は contextual keyword の末尾を拒否する前に本物の C# verbatim identifier を認識するようになり、`public @new Make() => new @new();` のような宣言は `symbols` / `outline` に残りつつ、`elapsed < TimeSpan.FromSeconds(...)` の phantom call-site 抑止は維持される。verbatim 戻り値型 repro を固定する focused regression test も追加。対象: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`。Closes #782。
- **C# の `await` / `yield` のような contextual keyword 型名が #496 の suffix guard で落ちなくなるよう修正 (#785)** — `HasInvalidCSharpReturnTypeSuffix` は合法な contextual identifier 型名を保持しつつ、本当に無効な statement / operator 断片だけを拒否するようになったため、`public await MakeAwait()` や `public yield MakeYield()` のようなメンバーが `symbols` / `definition` / `outline` に再び現れる。両方の contextual-keyword 戻り値型を固定する focused regression test も追加。対象: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`。Closes #785。
- **C# の括弧付き LINQ clause guard が、ローカル `const` 識別子を cast target と誤認しないよう修正 (#624)** — `ReferenceExtractor` は cast-close の曖昧性解消で、型付きローカル `const` 宣言も in-scope の値名として扱うようになった。これにより `(READY)` や `(Select)` のような括弧付き `orderby` 式が、識別子の見た目だけで型名扱いされて本物の後続 `select(...)` clause を潰すことがなくなる。一方で `(CustomType)select(items)` のような実際の cast は従来どおり clause をブロックする。uppercase constant repro を固定する focused な extractor / CLI `references --exact-name --json` 回帰を追加し、既存の keyword-named constant 回帰も built binary に対して再び通るようになった。対象: `src/CodeIndex/Indexer/ReferenceExtractor.cs`, `tests/CodeIndex.Tests/ReferenceExtractorTests.cs`, `tests/CodeIndex.Tests/QueryCommandRunnerTests.cs`, `CHANGELOG.md`。Closes #624。
- **installer の jq 版数取得テストが bash 関数 shim ではなく実 PATH スタブを使うよう修正 (#774)** — `InstallScriptTests.ResolveVersion_UsesJqWhenAvailable` は、一時ディレクトリ配下に実行可能な `jq` スタブを作成し、そのディレクトリを `PATH` の先頭へ差し込むようになった。これにより CI でも `command -v jq` 分岐を bash 関数解決やランナーのプリインストールツールに依存せず確実に通せる。installer 本体の jq 優先経路のカバレッジを維持しつつ、GitHub Actions 上の偽陽性 stderr を防ぐ。対象: `tests/CodeIndex.Tests/InstallScriptTests.cs`, `CHANGELOG.md`。Closes #774。
- **Java の同一行アノテーション、enum 定数 body override、record compact constructor が正しく抽出されるよう修正 (#221, #751, #755)** — `SymbolExtractor` は Java 宣言の先頭アノテーション処理を平坦な `[^)]*` regex prefix ではなく既存の lexer-aware scanner に寄せ、`@Label(")") public int broken()`、`@SuppressWarnings({"unchecked"}) public int first() { ... }`、注釈付き `record` ヘッダのような文字列/コメント/括弧/波括弧入りケースでも宣言を落とさなくなった。`public Range { ... }` のような record compact constructor も `function` として出し、匿名 enum 定数 body の範囲を保持することで `ADD { @Override public int apply(...) { ... } }` のような override が enum 定数コンテナへぶら下がる。さらに `int first() { ... } int second() { ... }` のような同一行 Java brace-body sibling も最初の signature に飲み込まれず個別に抽出され、`A { @Override int f() { ... } int g() { ... } }` のような same-line enum 定数 body 内メソッドも symbol table まで到達するようになった。issue の repro 群と enum 定数 body range 契約を固定する focused Java 回帰テストも追加。対象: `src/CodeIndex/Indexer/SymbolExtractor.cs`, `tests/CodeIndex.Tests/SymbolExtractorTests.cs`, `CHANGELOG.md`, `DEVELOPER_GUIDE.md`。Closes #221。Closes #751。Closes #755。
Expand Down
Loading
Loading