{"record":{"id":"8f9834975cbf5d72","repo":"tauri-apps/tauri","slug":"unexpected-list-input-8f9834","errorCode":null,"errorMessage":"unexpected list input","messagePattern":"unexpected list input","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/tauri-macros/src/context.rs","lineNumber":118,"sourceCode":"                lit: Lit::Bool(LitBool { value, .. }),\n                ..\n              }) = v.value\n              {\n                test = value;\n              } else {\n                return Err(syn::Error::new(input.span(), \"unexpected value for test\"));\n              }\n            }\n            name => {\n              return Err(syn::Error::new(\n                input.span(),\n                format!(\"unknown attribute {name}\"),\n              ));\n            }\n          }\n        }\n        Meta::List(_) => {\n          return Err(syn::Error::new(input.span(), \"unexpected list input\"));\n        }\n      }\n\n      let _ = input.parse::<Token![,]>();\n    }\n\n    Ok(Self {\n      config_file: config_file\n        .unwrap_or_else(|| {\n          std::env::var(\"CARGO_MANIFEST_DIR\")\n            .map(|m| PathBuf::from(m).join(\"tauri.conf.json\"))\n            .map_err(|e| e.to_string())\n        })\n        .map_err(|e| input.error(e))?,\n      root: root.unwrap_or_else(|| {\n        let mut segments = Punctuated::new();\n        segments.push(PathSegment {\n          ident: Ident::new(\"tauri\", Span::call_site()),","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-macros/src/context.rs#L100-L136","documentation":"generate_context parses its attribute content as a sequence of syn Meta items: a bare path (config path/root) and name=value pairs. A Meta::List — an identifier directly followed by a parenthesized group — has no valid position here, so parsing aborts with 'unexpected list input' spanned over the attribute.","triggerScenarios":"#[tauri::generate_context(capabilities(...))], #[tauri::generate_context(default(...))], or any name(...) group in the attribute; also typos where `=` degenerates into parentheses.","commonSituations":"List-style attribute syntax carried over from derive macros or other frameworks; refactoring name=value into helper-looking calls; hand-merging attributes incorrectly.","solutions":["Use key = value form: #[tauri::generate_context(capabilities = [\"core:default\"])]","Pass the optional config path as the leading bare string literal","Check for stray parentheses where an equals sign was intended"],"exampleFix":"// before\n#[tauri::generate_context(capabilities(\"core:default\"))]\n// after\n#[tauri::generate_context(capabilities = [\"core:default\"])]","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["No name(...) groups inside #[tauri::generate_context(...)]","Use key = value pairs and an optional leading string literal","After hand-merging attributes, check that every `=` survived"],"tags":["macros","generate-context","attributes","compile-time","syntax"],"backgroundTag":"macro-attribute-syntax-error","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","contentChangedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}