{"record":{"id":"c77255d55c928dc4","repo":"influxdata/influxdb","slug":"missing-id-record-ids-some-const","errorCode":null,"errorMessage":"missing `id = record_ids::SOME_CONST`","messagePattern":"missing `id = record_ids::SOME_CONST`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog_macros/src/lib.rs","lineNumber":130,"sourceCode":"                }\n                \"flags\" => {\n                    if flags.replace(nv.value).is_some() {\n                        return Err(syn::Error::new(nv.path.span(), \"duplicate `flags`\"));\n                    }\n                }\n                other => {\n                    return Err(syn::Error::new(\n                        nv.path.span(),\n                        format!(\n                            \"unknown argument `{other}`; supported arguments are `id`, `shape`, `flags`\"\n                        ),\n                    ));\n                }\n            }\n        }\n\n        let id = id.ok_or_else(|| {\n            syn::Error::new(\n                proc_macro2::Span::call_site(),\n                \"missing `id = record_ids::SOME_CONST`\",\n            )\n        })?;\n        let shape = shape.ok_or_else(|| {\n            syn::Error::new(\n                proc_macro2::Span::call_site(),\n                \"missing `shape = 0x…` — build with a placeholder to be told the expected value\",\n            )\n        })?;\n\n        Ok(Self {\n            id,\n            shape: shape.base10_parse()?,\n            shape_span: shape.span(),\n            flags,\n        })\n    }","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog_macros/src/lib.rs#L112-L148","documentation":"A compile-time proc-macro error raised when a catalog record definition omits the required `id` argument; the macro needs `id = record_ids::SOME_CONST` to assign the record type its stable identifier.","triggerScenarios":"Invoking the macro with only `shape`/`flags` or no arguments at all, e.g. `#[catalog(shape = 0x1)]`.","commonSituations":"Writing a new record definition and forgetting the id; deleting the id line during refactoring; assuming a default id exists.","solutions":["Add `id = record_ids::SomeConst` to the attribute, defining the constant in record_ids if needed","Copy the attribute usage from an existing record and adjust the id","Check the macro documentation for the required argument set"],"exampleFix":"// before\n#[catalog(shape = 0xbba17476)]\n// after\n#[catalog(id = record_ids::MyRecord, shape = 0xbba17476)]","handlingStrategy":"validation","validationCode":"// Attribute must contain id:\n// bad:  #[catalog(shape = 0x1)]\n// good: #[catalog(id = record_ids::MyRecord, shape = 0x1)]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always start a new record definition by copying a complete working attribute","Define the id constant in record_ids before using it","Treat id and shape as a mandatory pair"],"tags":["rust","proc-macro","missing-argument","attribute"],"backgroundTag":"missing-required-argument","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"}