Migrate C# ModuleDef to V9
Description of Changes
This migrates module definition to V9 for C# modules.
Note that it's based off #1573 which is why the target branch is currently not master. It will be changed and the Git history will be cleaned up when the base PR is merged.
For now the C# modules compile with new codegen & definitions, but I have no way to test it until we migrate spacetime generate to V9 so that we could run SDK tests against it. That's why I'm marking this PR as draft until that's resolved.
API and ABI breaking changes
If this is an API or ABI breaking change, please apply the corresponding GitHub label.
Expected complexity level and risk
How complicated do you think these changes are? Grade on a scale from 1 to 5, where 1 is a trivial change, and 5 is a deep-reaching and complex change.
This complexity rating applies not only to the complexity apparent in the diff, but also to its interactions with existing and future code.
If you answered more than a 2, explain what is complex about the PR, and what other components it interacts with in potentially concerning ways.
Testing
Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected!
- [x] Write a test you've completed here.
- [ ] Write a test you want a reviewer to do here, so they can check it off when they're satisfied.
Updated this PR to latest definitions. Thanks to #1661 + @coolreader18's #1675, I can verify that I'm now producing correct ModuleDef as it can generate Rust sources from a C# module. Further testing is still blocked by lack of V9 support in the actual runtime - I'm hitting https://github.com/clockworklabs/SpacetimeDB/blob/71c772248b527e790bf704e51206bdc6a550f330/crates/core/src/host/wasm_common/module_host_actor.rs#L159-L163 so leaving this PR as a draft.
My big question is whether it would make sense to get rid of the ColumnAttrs bitfield entirely.
What would you replace it with?
My big question is whether it would make sense to get rid of the ColumnAttrs bitfield entirely.
What would you replace it with?
On the Rust side, we have a data structure listing indexes, a data structure listing constraints, a data structure listing sequences, and that's it. It seems to work fine, but the logic in C# may be structured differently so that that isn't as easy to do. No need to make the change if it's just makework.