{"record":{"id":"a0da62c59a3a8afe","repo":"tauri-apps/tauri","slug":"unexpected-list-input","errorCode":null,"errorMessage":"unexpected list input","messagePattern":"unexpected list input","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/tauri-macros/src/command/wrapper.rs","lineNumber":59,"sourceCode":"  execution_context: ExecutionContext,\n  argument_case: ArgumentCase,\n  rename: RenamePolicy,\n}\n\nimpl Parse for WrapperAttributes {\n  fn parse(input: ParseStream) -> syn::Result<Self> {\n    let mut wrapper_attributes = WrapperAttributes {\n      root: quote!(::tauri),\n      execution_context: ExecutionContext::Blocking,\n      argument_case: ArgumentCase::Camel,\n      rename: RenamePolicy::Keep,\n    };\n\n    let attrs = Punctuated::<WrapperAttributeKind, Token![,]>::parse_terminated(input)?;\n    for attr in attrs {\n      match attr {\n        WrapperAttributeKind::Meta(Meta::List(_)) => {\n          return Err(syn::Error::new(input.span(), \"unexpected list input\"));\n        }\n        WrapperAttributeKind::Meta(Meta::NameValue(v)) => {\n          if v.path.is_ident(\"rename_all\") {\n            if let Expr::Lit(ExprLit {\n              lit: Lit::Str(s),\n              attrs: _,\n            }) = v.value\n            {\n              wrapper_attributes.argument_case = match s.value().as_str() {\n                \"snake_case\" => ArgumentCase::Snake,\n                \"camelCase\" => ArgumentCase::Camel,\n                _ => {\n                  return Err(syn::Error::new(\n                    s.span(),\n                    \"expected \\\"camelCase\\\" or \\\"snake_case\\\"\",\n                  ))\n                }\n              };","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-macros/src/command/wrapper.rs#L41-L77","documentation":"The #[tauri::command] attribute parser accepts only flat, comma-separated meta items: rename_all = \"...\", rename = \"...\", root = \"...\", and the bare async flag. A list-shaped sub-attribute (identifier followed by a parenthesized group) has no meaning to the wrapper macro and is rejected at compile time with 'unexpected list input', spanned over the whole attribute.","triggerScenarios":"Writing #[tauri::command(rename_all(snake_case))], #[tauri::command(rename(my_name))], or any key(value) group inside the command attribute. The Punctuated<WrapperAttributeKind, Token![,]> parse succeeds on the outer list, then each Meta::List item trips this error.","commonSituations":"Muscle memory from other attribute macros that use nested-list syntax; adapting code from older/other frameworks; a typo replacing `= value` with `(value)`.","solutions":["Use name=value syntax: #[tauri::command(rename_all = \"snake_case\")]","Remember the only accepted keys are rename_all, rename, root — plus the bare word async","Remove nested options; the macro has no list-form arguments in any version"],"exampleFix":"// before\n#[tauri::command(rename_all(snake_case))]\nfn do_thing(custom_arg: u32) {}\n// after\n#[tauri::command(rename_all = \"snake_case\")]\nfn do_thing(custom_arg: u32) {}","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use flat key = value syntax inside #[tauri::command(...)]","Only rename_all, rename, root (with values) and the bare word async are accepted","Copy command attribute examples from the docs matching your pinned tauri version"],"tags":["macros","command","attributes","compile-time","tauri-command"],"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"}