{"record":{"id":"bc3a37cdfa9fa2f0","repo":"influxdata/influxdb","slug":"shape-must-be-an-integer-literal-e-g-shape-0xbba17476","errorCode":null,"errorMessage":"`shape` must be an integer literal, e.g. `shape = 0xbba17476`","messagePattern":"`shape` must be an integer literal, e\\.g\\. `shape = 0xbba17476`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog_macros/src/lib.rs","lineNumber":104,"sourceCode":"                .path\n                .get_ident()\n                .ok_or_else(|| syn::Error::new(nv.path.span(), \"expected an argument name\"))?\n                .to_string();\n\n            match key.as_str() {\n                \"id\" => {\n                    if id.replace(nv.value).is_some() {\n                        return Err(syn::Error::new(nv.path.span(), \"duplicate `id`\"));\n                    }\n                }\n                \"shape\" => {\n                    let span = nv.value.span();\n                    let Expr::Lit(syn::ExprLit {\n                        lit: syn::Lit::Int(lit),\n                        ..\n                    }) = nv.value\n                    else {\n                        return Err(syn::Error::new(\n                            span,\n                            \"`shape` must be an integer literal, e.g. `shape = 0xbba17476`\",\n                        ));\n                    };\n                    if shape.replace(lit).is_some() {\n                        return Err(syn::Error::new(nv.path.span(), \"duplicate `shape`\"));\n                    }\n                }\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`\"","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog_macros/src/lib.rs#L86-L122","documentation":"The `shape` argument must be an integer literal (the macro reads it at compile time to compare against a computed checksum-like value). Passing any other expression — a variable, const path, string, or arithmetic — fails the ExprLit/Lit::Int pattern and raises this error.","triggerScenarios":"Writing `shape = MY_SHAPE`, `shape = 0xbba17476u64`, `shape = \"0xbba17476\"`, or `shape = some_fn()` instead of a bare integer literal like `shape = 0xbba17476`.","commonSituations":"Trying to reference a constant from another crate (the macro only sees a literal); copy-pasting a shape into a string; adding a type suffix that makes it a non-plain literal in older syn versions.","solutions":["Replace the value with a plain integer literal, e.g. `shape = 0xbba17476`","Remove variable/const references — inline the numeric value","Build with a placeholder literal; the compiler output tells you the expected value, then paste it in"],"exampleFix":"// before\n#[catalog(id = record_ids::X, shape = my_shape_const)]\n// after\n#[catalog(id = record_ids::X, shape = 0xbba17476)]","handlingStrategy":"validation","validationCode":"// shape must be a bare integer literal:\n// bad:  shape = MY_CONST, shape = \"0x1\", shape = 0x1u64\n// good: shape = 0xbba17476","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always inline the numeric shape value directly","Never reference constants or expressions in shape","Use the placeholder-then-fix workflow: build with 0x0 and paste the reported value"],"tags":["rust","proc-macro","integer-literal","attribute"],"backgroundTag":"invalid-argument-value","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"}