-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate C# ModuleDef to V9 #1670
Conversation
0b6c0f0
to
0fddd55
Compare
f63859d
to
71c7722
Compare
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 SpacetimeDB/crates/core/src/host/wasm_common/module_host_actor.rs Lines 159 to 163 in 71c7722
|
35d463a
to
9180254
Compare
Migrated C# ModuleDef to V9 as well as adds tests to ensure that identical modules indeed produce identical schemas. The two remaining discrepancies between Rust and C# are: - #1891 - Row-level security not having a designed API & implementation for C#. - Fixes #1948. - Fixes #1589. - Supersedes #1619.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this looks good. The codegen changes look sensible and the better debug-formatting Rust-side is a good idea. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no complaints. I think we should merge this ASAP.
Description of Changes
This migrates module definition to V9 for C# modules as we're planning to drop V8, and it can't represent some of the new features.
In the process, also improved Debug pretty-printing for the Rust typespace and nested types (to use in future diffs in tests).
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!