From 6500a3782b19522e52be93aba7f55f93141c1932 Mon Sep 17 00:00:00 2001 From: Colby Mchenry Date: Fri, 23 Oct 2026 12:32:36 +0000 Subject: [PATCH] fix(cfml): a or block that fails to parse no longer flags the file (#2843) Both delegates in cfml-extractor.ts read a block with its own grammar through a fresh TreeSitterExtractor and copied its errors onto the file. That extractor warns "parse produced no symbols (tree has errors) - the file is indexed but contributes nothing to the graph" when its tree has errors and it found no symbols: true of the block, not of the file, and a `` body never declares a symbol. So `codegraph init` printed the warning and `codegraph status` counted the file among those whose symbols are missing, though its component, methods and calls were indexed. extractTagExpressions already drops the warning for the same reason. Fix: the delegates record that warning as one naming the block and its line, with code partial_parse, so `codegraph files --json` shows which block failed while init and status, which key on parse_error, no longer report the file. Other errors pass through unchanged. The issue's own example SQL parses cleanly with the bundled cfquery grammar, so the reporter's trigger was not reproduced; any query body the grammar can't read (here `EQV` in a condition) and any statement-only block with a syntax error showed the same warning. Validation: - New cfml-embedded-parse-warning.test.ts: the repro DAO keeps its class, both methods and the call inside the failing query, and records one partial_parse warning naming at line 6; a failing block likewise; getIndexHealth lists neither file. All 3 fail on main's extractor and pass. status-index-health.test.ts passes. - On the repro, main prints the whole-file warning during init and status says 1 file could not be parsed so its symbols are missing; with the fix neither does. - A/B vs main f406fe00: FW/1, BlogCFC, ColdBox, ContentBox, Preside and CFWheels unchanged; in Wheels' vendor/wheels core (indexed as its own project) one file changed, tests/html.cfm, whose block at line 8 fails: its warning now names that block. Nodes, edges and references are identical in every repo. express and flask controls byte-identical. - Index time, median of 4 interleaved runs, CPU with workers, main vs fix: Preside 57.1 / 54.5 s, Wheels core 33.2 / 32.8 s. Within noise. Fixes #2654 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + __tests__/cfml-embedded-parse-warning.test.ts | 93 +++++++++++++++++++ src/extraction/cfml-extractor.ts | 33 +++++-- 3 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 __tests__/cfml-embedded-parse-warning.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 044d6c6c..37bfa094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - For Hermes Agent, `codegraph install` and `upgrade` no longer add `mcp-codegraph` to `platform_toolsets.cli`. Hermes up to 0.22.2 reported that name as an unknown toolset on every start, and Hermes 0.22.4 reads it as the only MCP server to load, hiding your others from CLI sessions; an entry an earlier install added is taken out again. A refresh also no longer resets your own `mcp_servers.codegraph` settings, such as an absolute command path, timeouts or `enabled: false`, and a config indented or written differently from Hermes's default no longer gets a duplicate or unreadable entry. Thanks @Huy3ko for the report and @conifercone for confirming it. (#2485) - `codegraph upgrade` now upgrades a global npm install when run from your home folder, which holds npm's global folder on Windows and with tools like nvm: before, it ran `npm install` without `-g` there, which left the global copy on the old version and put a second copy in your home folder. A copy installed in a project is now upgraded in that project wherever you run the command, with a warning if npm left it on the old version, and a copy installed with pnpm, yarn or bun gets the command that upgrades it instead of npm. Thanks @timlincool for the report and @maxmilian for the first fix. (#2477) - `codegraph status` no longer says the index is up to date while indexed files are missing their symbols: it now names files the parser couldn't read and files stored without their symbols (which `codegraph sync` repairs), `status --json` counts both, and `codegraph files --json` lists each file's recorded errors. Thanks @lipchey for the report. (#2336) +- In CFML, a `` or `` block the parser can't read no longer marks its whole file as contributing nothing to the graph: `codegraph init` no longer warns about the file, and `codegraph status` no longer lists it among files whose symbols are missing, since its component, functions and calls are all indexed. The file's recorded errors now name the block and its line instead. Thanks @HarryMuc for the report. (#2654) - Indexing large Python projects is much faster again and needs less memory: since 1.6.2, resolving Python references re-read source files over and over, so a project the size of CPython took several times as long to index. The graph it builds is unchanged. Thanks @bompus for the report. (#2332) - In VB.NET, reading or setting a `Shared` field or property through its class or module name, like `AppSession.SessionId`, `AppSession.CurrentUser = "demo"` or `AppSession.Items(0)`, now counts as a use of that member and of the class, and so do reading an `Enum` value like `Mode.Fast` and calling a `Shared` function without parentheses. Before, only calls written with parentheses were linked, so `codegraph callers` on such a field, property or class came back empty and impact missed most of the code that depends on it. A local, parameter or field that only shares a class's name is not mistaken for the class. Thanks @serkanince for the report and @ChrisPrapas. (#2305) - In Vue and Nuxt components, calls written in the template (`{{ formatDate(post) }}`, `:to="getAccountRoute(account)"`, `@click="save(item)"`) and calls in a destructuring declaration at the top of `