{"record":{"id":"e0b6f50e87852020","repo":"astral-sh/ruff","slug":"unknown-cache-field-argument-name","errorCode":null,"errorMessage":"Unknown `cache_field` argument {name}","messagePattern":"Unknown `cache_field` argument (.+?)","errorType":"exception","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/ruff_macros/src/cache_key.rs","lineNumber":143,"sourceCode":"\n#[derive(Debug, Default)]\nstruct CacheKeyFieldAttributes {\n    ignore: bool,\n}\n\nimpl Parse for CacheKeyFieldAttributes {\n    fn parse(input: ParseStream) -> syn::Result<Self> {\n        let mut attributes = CacheKeyFieldAttributes::default();\n\n        let args = input.parse_terminated(Ident::parse, Token![,])?;\n\n        for arg in args {\n            match arg.to_string().as_str() {\n                \"ignore\" => {\n                    attributes.ignore = true;\n                }\n                name => {\n                    return Err(Error::new(\n                        arg.span(),\n                        format!(\"Unknown `cache_field` argument {name}\"),\n                    ));\n                }\n            }\n        }\n\n        Ok(attributes)\n    }\n}\n","sourceCodeStart":125,"sourceCodeEnd":154,"githubUrl":"https://github.com/astral-sh/ruff/blob/26f38c119cac42e4d320ba08f09224fdec74af2c/crates/ruff_macros/src/cache_key.rs#L125-L154","documentation":"A syn compile error from parsing #[cache_field(...)] attributes in the CacheKey derive: an argument name other than the supported `ignore` was found. The attribute grammar only accepts ignore, so anything else is rejected at compile time.","triggerScenarios":"Thrown at crates/ruff_macros/src/cache_key.rs:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only #[cache_field(ignore)] on fields","Remove the unsupported argument from the attribute"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26f38c119cac42e4d320ba08f09224fdec74af2c","analyzedAt":"2026-09-05T10:32:37.492Z","contentChangedAt":"2026-09-05T10:32:37.492Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}