influxdata/influxdb · error · syn::Error

missing `shape = 0x…` — build with a placeholder to be told…

Error message

missing `shape = 0x…` — build with a placeholder to be told the expected value

What it means

A compile-time proc-macro error raised when a catalog record definition omits the required `shape` argument; building with a placeholder shape makes the macro report the expected value so the correct `shape = 0x…` can be filled in.

Solutions

  1. Add `shape = 0x…` with a placeholder literal (e.g. `0x0`) and build; the compiler message tells you the expected value, then paste it in
  2. Check git history for the record's previous shape value
  3. Look at sibling record definitions for the format of a valid shape

Example fix

// before
#[catalog(id = record_ids::MyRecord)]
// after
#[catalog(id = record_ids::MyRecord, shape = 0x0)] // build to learn expected value, then replace
Defensive patterns

Strategy: validation

Validate before calling

// Attribute must contain a shape literal:
// bad:  #[catalog(id = record_ids::X)]
// good: #[catalog(id = record_ids::X, shape = 0x0)] // 0x0 placeholder; build to learn expected value

Prevention

When it happens

Trigger: Invoking the macro with `id` but no `shape`, e.g. `#[catalog(id = record_ids::X)]`, or after removing a placeholder shape during refactoring.

Common situations: Defining a new record and not knowing the shape yet; deleting the shape line while silencing an earlier error; assuming shape is derived automatically.

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


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/7ca1f07af9f43295. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_catalog_macros/src/lib.rs:136

                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,
        })
    }
}

fn expand(metas: Punctuated<Meta, Token![,]>, item: ItemStruct) -> syn::Result<TokenStream2> {
    let args = Args::parse(metas)?;

    if !item.generics.params.is_empty() {

View on GitHub (pinned to 06200ef96b)