{"record":{"id":"15870525ed34914c","repo":"biomejs/biome","slug":"unexpected-attribute-inside-deprecated-path-te","errorCode":null,"errorMessage":"Unexpected attribute inside deprecated(): {path_text}","messagePattern":"Unexpected attribute inside deprecated\\(\\): (.+?)","errorType":"exception","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs","lineNumber":113,"sourceCode":"                                else {\n                                    let meta_text = meta.to_token_stream().to_string();\n                                    return Err(Error::new(\n                                        meta.span(),\n                                        format_args!(\"Unexpected attribute: {meta_text}\"),\n                                    ));\n                                };\n                                deprecated = if deprecated.is_some() {\n                                    return Err(Error::new(\n                                        meta.span(),\n                                        \"Only one attribute expected inside deprecated()\",\n                                    ));\n                                } else if path.is_ident(\"message\") {\n                                    Some(DeprecatedField::Message(s.value()))\n                                } else if path.is_ident(\"use_instead\") {\n                                    Some(DeprecatedField::UseInstead(s.value()))\n                                } else {\n                                    let path_text = path.to_token_stream().to_string();\n                                    return Err(Error::new(\n                                        path.span(),\n                                        format_args!(\n                                            \"Unexpected attribute inside deprecated(): {path_text}\"\n                                        ),\n                                    ));\n                                };\n                                Ok(())\n                            })?;\n                            opts.deprecated = deprecated;\n                        }\n                        _ => {\n                            let meta_text = meta.to_token_stream().to_string();\n                            return Err(Error::new(\n                                meta.span(),\n                                format_args!(\"Unexpected attribute: {meta_text}\"),\n                            ));\n                        }\n                    }","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/biomejs/biome/blob/405dedb0ff65dd29927faf587f6542e3c29db248/crates/biome_deserialize_macros/src/deserializable_derive/struct_field_attrs.rs#L95-L131","documentation":"Compile-time error from the #[deserializable] derive (struct_field_attrs.rs:113). Inside deprecated(...), a correctly shaped name-value item with a string literal must still use a known key: only path message and path use_instead are recognized. Any other key falls to the final else branch, which renders the path (e.g. 'since') into 'Unexpected attribute inside deprecated(): ...' at that path's span.","triggerScenarios":"#[deserializable(deprecated(since = \"1.2\"))], deprecated(note = \"...\"), deprecated(reason = \"...\"), or any other well-formed string name-value pair with an unsupported key.","commonSituations":"Porting serde attributes (since/note are common in serde ecosystems) or doc-comment conventions into deserializable; guessing a key name instead of checking the macro's supported vocabulary.","solutions":["Replace the unknown key with one of the two supported ones: deprecated(message = \"...\") or deprecated(use_instead = \"...\")","Remove attributes carrying unsupported metadata - put version history in a doc comment (/// ...) instead of the attribute"],"exampleFix":"// before\n#[deserializable(deprecated(note = \"renamed\"))]\npub rename: bool,\n\n// after\n#[deserializable(deprecated(message = \"Use `renamed` instead.\"))]\npub rename: bool,","handlingStrategy":"validation","validationCode":"// Rust - the only supported keys are message and use_instead\n#[deserializable(deprecated(message = \"...\"))]\n#[deserializable(deprecated(use_instead = \"...\"))]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not port serde's since/note vocabulary into deserializable; only message and use_instead exist","Put version metadata in /// doc comments, not in the attribute","When an attribute key is rejected, reread the macro's match arms rather than guessing synonyms"],"tags":["rust","proc-macro","compile-time","deserializable","attributes"],"backgroundTag":"derive-macro-attribute-validation","analyzedSha":"405dedb0ff65dd29927faf587f6542e3c29db248","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}