-
Notifications
You must be signed in to change notification settings - Fork 646
C# bindings for views #3585
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
base: master
Are you sure you want to change the base?
C# bindings for views #3585
Conversation
|
Some missing or dangling .meta found. Fix commits are needed.
|
Signed-off-by: Jason Larabie <jason@clockworklabs.io>
|
@JasonAtClockwork could you also disable parameters for now? We can re-enable once we have sql support for them. |
…ckworklabs/SpacetimeDB into rekhoff/csharp-view-bindings
Added another temporary error that will block arguments beyond the context: |
…g from the context parameter
joshua-spacetime
left a comment
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.
@JasonAtClockwork Can you try to copy over some of the negative compile tests that are in bindings/tests/ui/views.rs into bindings-csharp/Codegen.Tests/fixtures/diag/Lib.cs? You don't have to copy all of them over. I mainly just want to test that compilation fails if we try to access the wrong methods on ViewContext and AnonymousViewContext, or return the wrong type.
…or for improper View return types, and added more diag tests to mirror Rust tests
Copied most of the tests and fixed an issue with missing return type checks in the codegen |
joshua-spacetime
left a comment
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 reviewed the tests and the runtime, but I did not review the codegen. I feel confident approving based on the test coverage, although I will outline a few more tests that would be useful to add before merging:
- Can't obtain an identity from an AnonymousViewContext
- Can't call
Iter()on a table handle obtained from a read only context - Can't call mutations like delete on an index handle obtained from a read only context
Description of Changes
Updates C# bindings to allow module authors to define
Views andAnonymousViews using the pattern:During publishing of a C# module, the views data will be converted into
RawViewDefV9API and ABI breaking changes
No known breaking changes
Expected complexity level and risk
2
Testing
sdks\csharp\examples~\regression-tests\servertest and performing adotnet buildand aspacetime publish test, both of which succeeded.