{"record":{"id":"6409224fa19c8549","repo":"zed-industries/zed","slug":"query-file-name-is-not-supported-by-zed-and-shou","errorCode":null,"errorMessage":"query {file_name} is not supported by Zed and should be removed","messagePattern":"query (.+?) is not supported by Zed and should be removed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/extension_cli/src/main.rs","lineNumber":602,"sourceCode":"                                    \"Failed to parse tasks file at {path}\",\n                                    path = file_path.display()\n                                )\n                            })?;\n                }\n                _ => {\n                    if let Ok(_query) = file_name.parse::<QueryFile>() {\n                        let grammar = grammar.with_context(|| {\n                            format! {\n                                \"language {} provides query {} but no grammar\",\n                                config.name,\n                                file_path.display()\n                            }\n                        })?;\n\n                        let query_source = fs::read_to_string(&file_path)?;\n                        let _query = Query::new(grammar, &query_source)?;\n                    } else if file_name.ends_with(\".scm\") {\n                        bail!(\"query {file_name} is not supported by Zed and should be removed\")\n                    } else if !context.is_known_resource(&file_path) {\n                        bail!(\n                            \"'{file_name}' is not a supported file in a language directory and should be removed\"\n                        )\n                    }\n                }\n            }\n        }\n\n        log::info!(\"loaded language {}\", config.name);\n    }\n\n    Ok(())\n}\n\nasync fn test_themes(\n    manifest: &ExtensionManifest,\n    extension_path: &Path,","sourceCodeStart":584,"sourceCodeEnd":620,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/extension_cli/src/main.rs#L584-L620","documentation":"Raised during `extension test languages` when a file inside a language directory parses successfully as a QueryFile (e.g. highlights.scm, injections.scm) but the language's grammar failed to resolve or load, so Zed cannot compile the query. The with_context call augments the underlying grammar-loading error to state that language {name} declares query {path} without a usable tree-sitter grammar.","triggerScenarios":"Thrown at crates/extension_cli/src/main.rs:602 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the language entry in extension.toml declares a valid `grammar` field pointing to a tree-sitter grammar that clones and builds successfully","Check that the grammar repository, path and revisions in the grammar declaration are correct and reachable","Run the language tests locally with the extension CLI to confirm the grammar compiles before publishing"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-05T10:33:00.413Z","contentChangedAt":"2026-09-05T10:33:00.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}