{"record":{"id":"3dec59f787565a68","repo":"zed-industries/zed","slug":"failed-to-parse-snippet-file-at-snippet-path","errorCode":null,"errorMessage":"Failed to parse snippet file at {snippet_path:?}","messagePattern":"Failed to parse snippet file at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/extension_cli/src/main.rs","lineNumber":577,"sourceCode":"            let entry = entry?;\n            let file_path = entry.path();\n\n            let Some(file_name) = file_path.file_name().and_then(|name| name.to_str()) else {\n                continue;\n            };\n\n            match file_name {\n                LanguageConfig::FILE_NAME => {\n                    // Loaded above\n                }\n                SemanticTokenRules::FILE_NAME => {\n                    let _token_rules = SemanticTokenRules::load(&file_path)?;\n                }\n                TaskTemplates::FILE_NAME => {\n                    let task_file_content = std::fs::read(&file_path).with_context(|| {\n                        anyhow!(\n                            \"Failed to read tasks file at {path}\",\n                            path = file_path.display()\n                        )\n                    })?;\n                    let _task_templates =\n                        serde_json_lenient::from_slice::<TaskTemplates>(&task_file_content)\n                            .with_context(|| {\n                                anyhow!(\n                                    \"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()","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/extension_cli/src/main.rs#L559-L595","documentation":"During extension testing, a snippet file listed in the manifest could not be parsed: serde_json_lenient::from_slice::<VsSnippetsFile> on the file's bytes failed. The snippet file exists and was loaded, but its top-level structure is not a valid VS Code-style snippets file; {snippet_path} identifies the file.","triggerScenarios":"Thrown at crates/extension_cli/src/main.rs:552 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the JSON structure — a VS snippets file is an object keyed by snippet name with prefix/body/description fields","Validate JSON syntax separately (e.g. with a JSON linter) to rule out trailing commas or comments if strict parsing is used"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}