{"record":{"id":"640505aabad589fb","repo":"tursodatabase/turso","slug":"unknown-section","errorCode":null,"errorMessage":"Unknown section","messagePattern":"Unknown section","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"macros/src/ext/mod.rs","lineNumber":163,"sourceCode":"                    let content;\n                    syn::braced!(content in input);\n                    let parsed_items = Punctuated::<Ident, Token![,]>::parse_terminated(&content)?\n                        .into_iter()\n                        .collect();\n\n                    match section_name.to_string().as_str() {\n                        \"aggregates\" => aggregates = parsed_items,\n                        \"scalars\" => scalars = parsed_items,\n                        \"vtabs\" => vtabs = parsed_items,\n                        \"vfs\" => vfs = parsed_items,\n                        _ => unreachable!(),\n                    };\n\n                    if input.peek(Token![,]) {\n                        input.parse::<Token![,]>()?;\n                    }\n                } else {\n                    return Err(syn::Error::new(section_name.span(), \"Unknown section\"));\n                }\n            } else {\n                return Err(input.error(\"Expected aggregates:, scalars:, or vtabs: section\"));\n            }\n        }\n\n        Ok(Self {\n            aggregates,\n            scalars,\n            vtabs,\n            vfs,\n        })\n    }\n}\n\npub(crate) struct ScalarInfo {\n    pub name: String,\n    pub alias: Option<String>,","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/tursodatabase/turso/blob/244cde92a7df7f9b8b8b7a4075c35a12977e303e/macros/src/ext/mod.rs#L145-L181","documentation":"turso_macros' register_extension! parses its input as sections aggregates:, scalars:, vtabs:, vfs:, each followed by a braced, comma-separated identifier list. An identifier followed by a colon that is not one of these four fails compilation with \"Unknown section\", with the span pointing at the offending identifier.","triggerScenarios":"Writing functions:, udfs:, or any guessed section name in register_extension!; also using vfs: against a turso version where that section did not exist yet.","commonSituations":"Authoring a new extension from memory, an outdated template or docs page, or upgrading/downgrading turso where the accepted section set changed.","solutions":["Use only the four section names - plain scalar functions go under scalars:","Copy the exact macro grammar from extensions/ in the turso version you depend on","Update the extension crate's turso dependencies so macro and docs agree"],"exampleFix":"// before\nregister_extension! { functions: { rot13 } }\n// after\nregister_extension! { scalars: { rot13 } }","handlingStrategy":"validation","validationCode":"# CI guard: reject unknown register_extension! sections\nrg -n 'register_extension!' extensions/ -A0 | rg -v '(aggregates|scalars|vtabs|vfs)' && exit 1 || true","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy register_extension! invocations from extensions/ in the same repo revision","Use the macro's error span - it points at the exact bad section identifier","Regenerate extension scaffolding from a current example after turso upgrades"],"tags":["rust","proc-macro","compile-error","extensions"],"backgroundTag":"proc-macro-invalid-input","analyzedSha":"244cde92a7df7f9b8b8b7a4075c35a12977e303e","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}