{"record":{"id":"65e5950905c180ca","repo":"influxdata/influxdb","slug":"expected-name-value-supported-arguments-are-id-shape-flags","errorCode":null,"errorMessage":"expected `name = value`; supported arguments are `id`, `shape`, `flags`","messagePattern":"expected `name = value`; supported arguments are `id`, `shape`, `flags`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog_macros/src/lib.rs","lineNumber":80,"sourceCode":"}\n\n/// Parsed `#[catalog_record(..)]` arguments.\nstruct Args {\n    id: Expr,\n    shape: u32,\n    shape_span: proc_macro2::Span,\n    flags: Option<Expr>,\n}\n\nimpl Args {\n    fn parse(metas: Punctuated<Meta, Token![,]>) -> syn::Result<Self> {\n        let mut id = None;\n        let mut shape = None;\n        let mut flags = None;\n\n        for meta in metas {\n            let Meta::NameValue(nv) = meta else {\n                return Err(syn::Error::new(\n                    meta.span(),\n                    \"expected `name = value`; supported arguments are `id`, `shape`, `flags`\",\n                ));\n            };\n            let key = nv\n                .path\n                .get_ident()\n                .ok_or_else(|| syn::Error::new(nv.path.span(), \"expected an argument name\"))?\n                .to_string();\n\n            match key.as_str() {\n                \"id\" => {\n                    if id.replace(nv.value).is_some() {\n                        return Err(syn::Error::new(nv.path.span(), \"duplicate `id`\"));\n                    }\n                }\n                \"shape\" => {\n                    let span = nv.value.span();","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog_macros/src/lib.rs#L62-L98","documentation":"This proc macro parses attribute arguments strictly as `name = value` pairs. If it encounters a Meta item that is not NameValue (e.g. a bare path like `#[catalog(..., foo)]` or a list `foo(...)`), it emits this error pointing at that argument.","triggerScenarios":"Writing an attribute argument without a value, e.g. `#[catalog(id, shape = 0x1)]`, or passing a list-style argument `flags(debug)` instead of `flags = ...`.","commonSituations":"Copy-pasting attribute syntax from other crates that accept bare flags; typos omitting the `= value` part; confusion between flag-style and key-value style macro attributes.","solutions":["Give every argument a value: write `id = record_ids::X`, `shape = 0x…`, `flags = …`","Remove any bare/positional arguments that are not `name = value` pairs","Only use the supported keys id, shape, flags"],"exampleFix":"// before\n#[catalog(id, shape = 0xbba17476)]\n// after\n#[catalog(id = record_ids::MyRecord, shape = 0xbba17476)]","handlingStrategy":"validation","validationCode":"// Pre-check each attribute argument is `name = value`\n// bad:  #[catalog(id, shape = 0x1)]\n// good: #[catalog(id = record_ids::X, shape = 0x1)]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write attribute arguments as `key = value` pairs","Only use the documented keys id, shape, flags","Copy attribute examples from existing working record definitions"],"tags":["rust","proc-macro","syntax","attribute"],"backgroundTag":"invalid-argument-format","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}