Skip to content
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

Create Test of C# Code Generation for Tables with BTree indexes of type Identity #2362

Open
rekhoff opened this issue Mar 7, 2025 · 0 comments
Assignees

Comments

@rekhoff
Copy link
Contributor

rekhoff commented Mar 7, 2025

Action to perform:

Add a test to com.clockworklabs.spacetimedbsdk that checks code generation of a Table with an index of type btree of an Identity type is generating C# code as intended.
Manually performed example from #2354 that should be reproduced in an automated test:

  1. Created a test project with a Rust server defining a table with a btree index like:
#[index(btree)]
pub identity: Identity,

and another where a table was defined with:
#[spacetimedb::table(name = period_timer, scheduled(period, at = scheduled_at), index(name = identity, btree(columns = [identity])))]
2. Published the server.
3. Created a C# client and generated the bindings.
4. Confirmed issue existed prior to change: IDE reports an error in the table definition of The type 'SpacetimeDB.Identity' must be convertible to 'System.IComparable<SpacetimeDB.Identity>' in order to use it as parameter 'Column' in the generic class 'SpacetimeDB.RemoteTableHandle<EventContext,Row>.BTreeIndexBase<Column>'
5. Made change contained in this PR.
6. Rebuilt SpacetimeDB executables, and C# SDK NuGet files.
7. Tested again by republishing and regenerating bindings.
8. Observed IDE no longer reports issue.

Ticket Generated from the comment:
#2354 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant