Commit Graph
1 Commits
Author SHA1 Message Date
Colby MchenryandClaude Opus 5.5 6500a3782b fix(cfml): a <cfquery> or <cfscript> 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
`<cfquery>` 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 <cfif> condition) and any
statement-only <cfscript> 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 <cfquery> at line 6; a failing <cfscript>
  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 <cfscript> 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 <noreply@anthropic.com>
2026-10-23 12:32:36 +00:00