clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.41k stars 110 forks source link

Eliminate special casing of `Identity` and `Address` in SATS and codegen #1937

Closed bfops closed 2 weeks ago

bfops commented 2 weeks ago

Protobufectomy makes this unnecessary; see how it handles e.g. Timestamp as a normal type.

cloutiertyler commented 2 weeks ago

I'm closing this one. The reasoning is that @kazimuth refactored a lot of the code gen internals so as to treat the names of types as purely code generation information and not information that should be included in the SATS types. The builtin way to add more special types like these is to include them in TypespaceForGenerate which a typespace that include additional metadata for generating types in a nominal type system language.

gefjon commented 2 weeks ago

We've actually gone the other way, and made more types special; it turns out to be necessary in order to correlate types referenced by multiple modules (or by both a module and the client API).