influxdata/influxdb · error · syn::Error
missing `id = record_ids::SOME_CONST`
Error message
missing `id = record_ids::SOME_CONST`
What it means
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.
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
Example fix
// before #[catalog(shape = 0xbba17476)] // after #[catalog(id = record_ids::MyRecord, shape = 0xbba17476)]
Defensive patterns
Strategy: validation
Validate before calling
// Attribute must contain id: // bad: #[catalog(shape = 0x1)] // good: #[catalog(id = record_ids::MyRecord, shape = 0x1)]
Prevention
- 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
When it happens
Trigger: Invoking the macro with only `shape`/`flags` or no arguments at all, e.g. `#[catalog(shape = 0x1)]`.
Common situations: Writing a new record definition and forgetting the id; deleting the id line during refactoring; assuming a default id exists.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- missing `shape = 0x…` — build with a placeholder to be told…
- duplicate `flags`
- duplicate `id`
- duplicate `shape`
- expected an argument name
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/c77255d55c928dc4.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_catalog_macros/src/lib.rs:130
}
"flags" => {
if flags.replace(nv.value).is_some() {
return Err(syn::Error::new(nv.path.span(), "duplicate `flags`"));
}
}
other => {
return Err(syn::Error::new(
nv.path.span(),
format!(
"unknown argument `{other}`; supported arguments are `id`, `shape`, `flags`"
),
));
}
}
}
let id = id.ok_or_else(|| {
syn::Error::new(
proc_macro2::Span::call_site(),
"missing `id = record_ids::SOME_CONST`",
)
})?;
let shape = shape.ok_or_else(|| {
syn::Error::new(
proc_macro2::Span::call_site(),
"missing `shape = 0x…` — build with a placeholder to be told the expected value",
)
})?;
Ok(Self {
id,
shape: shape.base10_parse()?,
shape_span: shape.span(),
flags,
})
}View on GitHub (pinned to 06200ef96b)