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.

Solutions

  1. 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).
  2. Remove the option if it is not needed; boolean flags like `volatile` need no value.
  3. 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

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


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/cfef88e283925dd4. Report an issue: GitHub.

Appendix: 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)