risingwavelabs/risingwave · error
invalid property: {:?}
Error message
invalid property: {:?} What it means
The `#[function]` attribute parser accepts a fixed allowlist of keys (batch_fn, state, init_state, prebuild, type_infer, generic, volatile, deprecated, internal, rewritten, append_only). Any other key in the attribute list yields this spanned error naming the unknown path, catching misspelled or unsupported options at compile time.
Source
Thrown at src/expr/macro/src/parse.rs:90
parsed.state = Some(get_value()?);
} else if meta.path().is_ident("init_state") {
parsed.init_state = Some(get_value()?);
} else if meta.path().is_ident("prebuild") {
parsed.prebuild = Some(get_value()?);
} else if meta.path().is_ident("type_infer") {
parsed.type_infer = Some(get_value()?);
} else if meta.path().is_ident("generic") {
parsed.generic = Some(get_value()?);
} else if meta.path().is_ident("volatile") {
parsed.volatile = true;
} else if meta.path().is_ident("deprecated") || meta.path().is_ident("internal") {
parsed.deprecated = true;
} else if meta.path().is_ident("rewritten") {
parsed.rewritten = true;
} else if meta.path().is_ident("append_only") {
parsed.append_only = true;
} else {
return Err(Error::new(
meta.span(),
format!("invalid property: {:?}", meta.path()),
));
}
}
Ok(parsed)
}
}
impl Parse for UserFunctionAttr {
fn parse(input: ParseStream<'_>) -> Result<Self> {
let itemfn: syn::ItemFn = input.parse()?;
Ok(UserFunctionAttr::from(&itemfn.sig))
}
}
impl From<&syn::Signature> for UserFunctionAttr {
fn from(sig: &syn::Signature) -> Self {View on GitHub (pinned to 6469eb736d)
Solutions
- Correct the key spelling to one of the supported options (batch_fn, state, init_state, prebuild, type_infer, generic, volatile, deprecated, internal, rewritten, append_only).
- Remove the option if it is not needed; boolean flags like `volatile` need no value.
- Check git history of src/expr/macro/src/parse.rs if following an outdated example — the option may have been renamed.
Example fix
// before - misspelled option
#[function("my_add(int4, int4)", parrallel = true)]
// after
#[function("my_add(int4, int4)", volatile = true)] Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED_KEYS: &[&str] = &["batch_fn","state","init_state","prebuild","type_infer","generic","volatile","deprecated","internal","rewritten","append_only"];
fn key_allowed(k: &str) -> bool { ALLOWED_KEYS.contains(&k) }
assert!(key_allowed("volatile"));
assert!(!key_allowed("parrallel")); Prevention
- Keep the allowlist (parse.rs `is_ident` chain) open while writing attributes and pick names from it.
- Watch for renames across versions: `internal` replaced `deprecated` in some paths; `append_only` and `rewritten` are newer flags.
- Enable editor completion by checking docs of #[function] before adding options.
When it happens
Trigger: Writing an unrecognized key like `#[function("f(int4)", parrallel = true)]`, `readonly`, or an option removed in a newer/older macro version.
Common situations: Typos in attribute names; copying attribute options from other proc-macro ecosystems (e.g. `#[derive]`-style flags); using a renamed option after a macro refactor (e.g. old names that became `internal`/`append_only`).
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- expected literal
- expected string literal
- You can't use the macro on this type
- Expected #[serde_prefix_all(skip)]
- type inference function cannot be automatically derived. You
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/cfef88e283925dd4.
Report an issue: GitHub.