Skip to content

CFML: misleading "parse produced no symbols" warning when only an embedded <cfquery> block fails to parse #2654

Closed

Description

@HarryMuc

Summary

Files whose <cfquery> contains SQL split across <cfif> get this warning in files.errors:

parse produced no symbols (tree has errors) — the file is indexed but contributes nothing to the graph

But these files do contribute symbols. Only the sub-parse of the query block fails.

Example

<cfquery name="q" datasource="#dsn#">
	SELECT <cfif arguments.fields IS "count">COUNT(*)<cfelse>p.*</cfif>
	FROM pages p
</cfquery>

contens/model/appsettings/appsettingsdao.cfc has 1 class and 16 methods in the graph, yet it carries the warning above. Our project has 66 DAO/gateway files like this.

Expected

  • The warning names the failing embedded block (<cfquery> at line N) instead of saying that the file contributes nothing.
  • If possible, #…# expressions inside a <cfquery> that fails to parse are still extracted.

(The SQL-fragment parsing itself belongs to tree-sitter-cfml.)

Activity

  1. added a commit that references this issue on Oct 23, 2026
    9fc2bc6
  2. added a commit that references this issue on Oct 23, 2026
    6500a37
  3. colbymchenry commented on Oct 23, 2026

    @colbymchenry
    Owner

    Thanks for the report!

    #2843 is merged to main. A <cfquery> or <cfscript> block that fails to parse no longer flags the whole file:

    • codegraph init no longer prints the "contributes nothing" warning for it.
    • codegraph status no longer counts it among files whose symbols are missing.
    • The file's recorded errors now name the block and its line instead.

    #…# expressions inside a failing query were already extracted where the parser recovers.

    We couldn't reproduce the parse failure with the SQL in your example. It parses cleanly with the bundled grammar, as did about 110 other query shapes we tried. If you can share one of the affected queries, we'd like to look at the grammar side too; feel free to reopen with it. The fix ships in the next release.

  4. HarryMuc commented on Oct 28, 2026

    @HarryMuc
    Author

    Thanks, I will re-check with the next release and send you queries if I still find something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions