Open
Conversation
7ee1b81 to
1ba4286
Compare
73f986b to
7d0ddae
Compare
7d0ddae to
08f8f04
Compare
08f8f04 to
5a173d1
Compare
5a173d1 to
11f0576
Compare
11f0576 to
4c095a8
Compare
d616ea9 to
cbcd089
Compare
f5cbb0e to
ee62ea2
Compare
Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
Shubham8287
commented
Feb 19, 2026
Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
Branched from `shub/case-conversion` (#4263). Re-enables the four bench tests that were commented out during the case conversion work: - `test_basic_invariants_sqlite` - `test_basic_invariants_spacetime_raw` - `test_basic_invariants_spacetime_module_rust` - `test_basic_invariants_spacetime_module_csharp` Restores `serial_test` import and `#[serial]` attributes. Only changes `crates/bench/src/lib.rs`. Compiles clean locally (`cargo test -p spacetimedb-bench --no-run`). cc @Shubham8287 --------- Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
The case conversion (SnakeCase policy) converts table names like OneU8 to one_u_8 (inserting underscore at letter-digit boundary), but the hardcoded SQL subscription queries in SUBSCRIBE_ALL and throughout the test client still used the old names (one_u8, pk_u32, vec_u8, etc.). This caused all SDK tests to timeout: subscriptions silently matched nothing, so on_insert callbacks never fired. Updated all hardcoded SQL table names to match their post-conversion canonical forms.
…bs/SpacetimeDB into shub/case-conversion
The test-client is recompiled with fresh bindings for each module variant (Rust sdk-test, C# sdk-test-cs, TS sdk-test-ts). The C# and TS modules use explicit accessor names like 'one_u8', while the Rust module's 'OneU8' gets case-converted to 'one_u_8'. Hardcoded SQL can't work for all variants. Replace all hardcoded table names in SQL queries with lookups against RemoteModule::ALL_TABLE_NAMES (generated by codegen). A table_name() helper does underscore-insensitive matching so the same source code works regardless of case conversion policy. This fixes the Test Suite failures for csharp:: and typescript:: tests that were broken by the previous commit's hardcoded name change.
a97eec8 to
6c1a445
Compare
Contributor
Author
|
This PR have a known bug related to due to camel casing table identifier in typescript bindings, I have @coolreader18 to look into that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Update the Default casing policy to
snake_caseforRawModuleDefV10.Messy PR contains changes at different places, so that CI can pass:
Here are the main changes as follows:
bindings-macro&bindingscrate:namemacro in Indexes for canonical name and supply it toRawModuleDefV10viaExplicitNames.bindings-typescript:binding-csharp: a single line change to passsourceNameof index instead of null.codegen:Changes has been merged from branch - Use accessor_name for generated identifiers in codegens #4337.
Except a fix in rust codegen to use canonical name in Query buillder instead of accessor.
lib/db/raw_def: ExtendsRawDefModuleV10structure to support case conversion.schemacrate:validate/v9- Nothing itself should change or changes in v9 validation logic but the file contains aCoreValidatorwhich is shared withvalidate/v10. No test have t be updated tovalidate/v9which ensures we aren't regressing it.validate/v10: This is the main meat, look at the new tests added in bottom to understand what it does.Rest of the files are either test updates or module bindings.
Testing:
ModuleDefis correct.I have removed
sql.pysmoketest, as that seems to be already migated in new framework and was headache to update.Expected complexity level and risk
4, It could have side-effect which aren't easily visible.