{"record":{"id":"d4320711afd89861","repo":"risingwavelabs/risingwave","slug":"expected-serde-prefix-all-skip","errorCode":null,"errorMessage":"Expected #[serde_prefix_all(skip)]","messagePattern":"Expected #\\[serde_prefix_all\\(skip\\)\\]","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/common/proc_macro/src/serde_prefix_all.rs","lineNumber":172,"sourceCode":"    let mut filtered = Vec::with_capacity(attrs.len());\n\n    for attr in attrs.drain(..) {\n        if !attr.path.is_ident(\"serde_prefix_all\") {\n            filtered.push(attr);\n            continue;\n        }\n\n        let meta = attr.parse_meta()?;\n        match meta {\n            Meta::List(list) => {\n                let mut has_skip = false;\n                for nested in &list.nested {\n                    match nested {\n                        NestedMeta::Meta(Meta::Path(path)) if path.is_ident(\"skip\") => {\n                            has_skip = true;\n                        }\n                        _ => {\n                            return Err(Error::new(\n                                nested.span(),\n                                \"Expected #[serde_prefix_all(skip)]\",\n                            ));\n                        }\n                    }\n                }\n\n                if !has_skip {\n                    return Err(Error::new(\n                        list.span(),\n                        \"Expected #[serde_prefix_all(skip)]\",\n                    ));\n                }\n\n                found_skip = true;\n            }\n            _ => {\n                return Err(Error::new(","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/common/proc_macro/src/serde_prefix_all.rs#L154-L190","documentation":"Inside take_skip_attr, a #[serde_prefix_all(...)] attribute on a variant or field contained a nested argument that was not exactly the bare path `skip` (e.g. `#[serde_prefix_all(rename_all)]` or `#[serde_prefix_all(skip = true)]`). The macro only accepts `skip` inside this inner attribute, so any other nested meta is rejected with this message.","triggerScenarios":"Writing `#[serde_prefix_all(alias)]` or `#[serde_prefix_all(skip = \"x\")]` or `#[serde_prefix_all(anything_else)]` on an enum variant or struct field. Any nested item that is not `NestedMeta::Meta(Meta::Path)` with ident `skip` triggers this.","commonSituations":"Users guessing at the inner-attribute syntax and trying to pass configuration like rename/alias mode into the field-level attribute (mode belongs in the top-level macro args); typos like `skipped`; copying serde attribute styles into serde_prefix_all.","solutions":["Change the nested argument to the bare identifier `skip`: `#[serde_prefix_all(skip)]`.","Remove the inner attribute entirely if the field/variant should be prefixed.","Move configuration such as mode=\"rename\" to the top-level #[serde_prefix_all(..., mode = \"rename\")] usage."],"exampleFix":"// before\n#[serde_prefix_all(skip = true)]\nfield: u32,\n\n// after\n#[serde_prefix_all(skip)]\nfield: u32,","handlingStrategy":"validation","validationCode":"// The only valid inner form on a field/variant is:\n// #[serde_prefix_all(skip)]\n// Reject anything else:\nfn is_valid_inner(attr: &str) -> bool {\n    let inner = attr.trim_start_matches(\"#[serde_prefix_all(\").trim_end_matches(\")\");\n    inner.trim() == \"skip\"\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember the inner field/variant attribute accepts exactly one token: `skip`.","Put mode (rename/alias) in the top-level macro args, not the inner attribute.","Don't copy serde-style nested options into serde_prefix_all inner attributes."],"tags":["proc-macro","compile-time","attribute-syntax","serde"],"backgroundTag":"invalid-enum-argument","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}