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
Swapping between the C# and Rust versions of the modules, the generated code is ALMOST identical. In the C# client code, the user can always call reducers like .EnterGame() and have it work.
The difference is that, if the C# version of the module is used, under the hood, .EnterGame() sends a message containing the string "EnterGame". On the other hand, if the Rust version of the module is used, under the hood, .EnterGame() send a message containing the string "enter_game". This means that the user needs to regenerate client code when swapping between the modules, despite there not being any user-facing API changes.
If we want to fix this, we could canonicalize reducer names in a module to either a snake_case or a CamelCase convention.
The text was updated successfully, but these errors were encountered:
Swapping between the C# and Rust versions of the modules, the generated code is ALMOST identical. In the C# client code, the user can always call reducers like .EnterGame() and have it work.
FWIW you could just rename C# methods to match Rust ones - that's what we do for ModuleDef equivalence comparisons between C#/Rust modules in tests.
Noticed this while playing with Blackholio.
Swapping between the C# and Rust versions of the modules, the generated code is ALMOST identical. In the C# client code, the user can always call reducers like
.EnterGame()
and have it work.The difference is that, if the C# version of the module is used, under the hood,
.EnterGame()
sends a message containing the string"EnterGame"
. On the other hand, if the Rust version of the module is used, under the hood,.EnterGame()
send a message containing the string"enter_game"
. This means that the user needs to regenerate client code when swapping between the modules, despite there not being any user-facing API changes.If we want to fix this, we could canonicalize reducer names in a module to either a snake_case or a CamelCase convention.
The text was updated successfully, but these errors were encountered: