Skip to content

Use accessor_name for generated identifiers in codegens#4337

Closed
cloutiertyler wants to merge 1 commit intomasterfrom
tyler/use-accessor-name-in-codegen
Closed

Use accessor_name for generated identifiers in codegens#4337
cloutiertyler wants to merge 1 commit intomasterfrom
tyler/use-accessor-name-in-codegen

Conversation

@cloutiertyler
Copy link
Contributor

Summary

  • Client code generators (TS, Rust, C#, Unreal C++) now use accessor_name instead of name for generated language identifiers (type names, filenames, method names, variable names)
  • The name field continues to be used for protocol/wire communication (table names sent over WebSocket, reducer names in schema, match arms on wire data)
  • Updated iter_table_names_and_types in util.rs to return both name and accessor_name

Closes #4324

Test plan

  • cargo build -p spacetimedb-codegen compiles
  • cargo test -p spacetimedb-codegen — all 3 codegen tests pass (TypeScript, Rust, C#)
  • cargo fmt — all files formatted
  • In V9 modules, accessor_name == name always, so this is a no-op for existing modules

…degens

Client code generators now use `accessor_name` instead of `name` for
generated language identifiers (type names, filenames, method names,
variable names). The `name` field continues to be used for protocol/wire
communication (table names sent over WebSocket, reducer names in schema,
match arms on wire data).

Closes #4324
@joshua-spacetime
Copy link
Collaborator

This has been merged into #4263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants

Comments