You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We reserve all reducer names beginning with two underscores __, and with on or On. Double-underscore reducer names are used internally to implement built-in reducers, and on/On are used in SDK codegen for reducer callbacks.
Attempting to define a reducer with a name that matches these patterns will cause an error at macro-expand time. Implementors are also encouraged to signal an error at publish time if a module circumvents the bindings library and manually constructs a ModuleDef containing one of these names in a reserved position.
Those are rejected in C# as per proposal, but not in Rust. In fact, rust-wasm-test actually defines such a reducer that should be illegal now:
The API proposal states:
Those are rejected in C# as per proposal, but not in Rust. In fact, rust-wasm-test actually defines such a reducer that should be illegal now:
SpacetimeDB/modules/rust-wasm-test/src/lib.rs
Lines 241 to 242 in 729dbb1
and in generated TS code it ends up looking as
OnOnConnect
event.The text was updated successfully, but these errors were encountered: