{"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/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-macros/src/context.rs#L100-L136","documentation":"A compile-time error from `tauri::generate_context!`. The macro's parser accepts bare paths (Meta::Path) and name-value pairs (Meta::NameValue); list-style syntax like `capabilities = [...]` written as a bare list or `attr(...)` form is rejected with this message.","triggerScenarios":"Writing list syntax inside generate_context!, e.g. `generate_context!(foo(a, b))` or passing `capabilities(...)` instead of `capabilities = [...]`.","commonSituations":"Confusing Rust attribute syntax (#[tauri::command(...)]) with macro-argument syntax; copy-pasting derive-style helper attributes into generate_context!.","solutions":["Rewrite the input as name = value pairs: capabilities = [\"...\"]","Pass the config path as the first plain string argument, then comma-separated key = value options","Remove any parenthesized/bracketed list that is not part of a key = value pair"],"exampleFix":"// before\ntauri::generate_context!(config(\"tauri.conf.json\"))\n// after\ntauri::generate_context!(\"tauri.conf.json\")","handlingStrategy":"validation","validationCode":"// generate_context! accepts: \"config path\", key = value pairs, and a bare root path\nfn shape_ok(args: &str) -> bool {\n  args.starts_with('\"') || args.contains(\"=\") || args.chars().all(|c| c.is_alphanumeric() || c == ':' || c == '_')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use key = value syntax, never parenthesized lists","Mirror the canonical example: tauri::generate_context!(\"tauri.conf.json\")","Avoid mixing derive-attribute syntax into macro arguments"],"tags":["compile-time","macro","syntax","invalid-argument"],"backgroundTag":"invalid-argument-format","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}