Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
12e95c8
Update C# bindings to use new View ABI
rekhoff Jan 27, 2026
d6ae551
Adding `Codegen.Test` snapshot updates
rekhoff Jan 28, 2026
0c02dbe
Merge branch 'master' into rekhoff/add-views-returning-queries
rekhoff Jan 28, 2026
dec5af0
Merge branch 'master' into rekhoff/add-views-returning-queries
rekhoff Jan 28, 2026
301b109
Initial add of C# module Typed Query Builder
rekhoff Jan 29, 2026
14f1ad1
Merge branch 'master' into rekhoff/add-views-returning-queries
rekhoff Jan 29, 2026
2aae402
Merge branch 'rekhoff/add-views-returning-queries' into rekhoff/cshar…
rekhoff Jan 29, 2026
7e5385b
Merge branch 'master' into rekhoff/add-views-returning-queries
rekhoff Jan 29, 2026
db3435b
Merge branch 'master' into rekhoff/add-views-returning-queries
rekhoff Jan 30, 2026
804cef2
Merge branch 'rekhoff/add-views-returning-queries' into rekhoff/cshar…
rekhoff Jan 30, 2026
0d3441f
Moved QueryBuilder to BSATN.Runtime to remove duplicate code
rekhoff Jan 31, 2026
0c196ed
Removed QueryBuilder meta file and updated SQL validation tests
rekhoff Feb 1, 2026
e55ba7d
Another formatting fix in QueryBuilderTests test
rekhoff Feb 1, 2026
0cb858c
Created specific Python test that invokes PublicTableQuery view
rekhoff Feb 3, 2026
84e7206
Use the literal overload in equality test
rekhoff Feb 3, 2026
40dfe17
Updated lints
rekhoff Feb 3, 2026
02ac28f
Moved end-to-end QueryBuilder test to csharp_module.py
rekhoff Feb 3, 2026
ac429f3
Removed new testing from python test entirely
rekhoff Feb 3, 2026
04c5794
Removed unneeded testing framework from server fixture
rekhoff Feb 4, 2026
d250f89
Readding a test that invokes Codegen.Tests views
rekhoff Feb 4, 2026
cecd264
Trigger Build
rekhoff Feb 5, 2026
a6d7ba9
Remove accidental add
rekhoff Feb 5, 2026
78c2b7c
Merge branch 'master' into rekhoff/csharp-module-query-builder
rekhoff Feb 7, 2026
bf96a67
Corrected a test in Codegen.Test and added module testing to regressi…
rekhoff Feb 10, 2026
d8f9d32
Added regression test for on view update received
rekhoff Feb 10, 2026
4b388e4
Merge branch 'master' into rekhoff/csharp-module-query-builder
rekhoff Feb 10, 2026
5f27d29
Updated all Regression Tests Views to go through `ctx`
rekhoff Feb 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,216 changes: 1,216 additions & 0 deletions crates/bindings-csharp/BSATN.Runtime/QueryBuilder.cs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions crates/bindings-csharp/Codegen.Tests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public static async Task<Fixture> Compile(string name)
return new(projectDir, (CSharpCompilation)compilation!);
}

public Task Verify(string fileName, object target) =>
Verifier.Verify(target).UseDirectory($"{projectDir}/snapshots").UseFileName(fileName);

private static CSharpGeneratorDriver CreateDriver(
IIncrementalGenerator generator,
LanguageVersion languageVersion
Expand All @@ -42,9 +45,6 @@ LanguageVersion languageVersion
);
}

public Task Verify(string fileName, object target) =>
Verifier.Verify(target).UseDirectory($"{projectDir}/snapshots").UseFileName(fileName);

private async Task<IEnumerable<SyntaxTree>> RunAndCheckGenerator(
IIncrementalGenerator generator
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,144 @@ SpacetimeDB.Internal.Module.RegisterClientVisibilityFilter(global::Module.MY_THI
]
}
},
{/*
public global::SpacetimeDB.Table<global::InAnotherNamespace.TestDuplicateTableName, TestDuplicateTableNameCols, TestDuplicateTableNameIxCols> TestDuplicateTableName() =>
new("TestDuplicateTableName", new TestDuplicateTableNameCols("TestDuplicateTableName"), new TestDuplicateTableNameIxCols("TestDuplicateTableName"));
^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
Message: The call is ambiguous between the following methods or properties: 'TestDuplicateTableNameCols.TestDuplicateTableNameCols(string)' and 'TestDuplicateTableNameCols.TestDuplicateTableNameCols(string)',
Comment thread
rekhoff marked this conversation as resolved.
Severity: Error,
Descriptor: {
Id: CS0121,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0121),
MessageFormat: The call is ambiguous between the following methods or properties: '{0}' and '{1}',
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*
public global::SpacetimeDB.Table<global::TestDuplicateTableName, TestDuplicateTableNameCols, TestDuplicateTableNameIxCols> TestDuplicateTableName() =>
new("TestDuplicateTableName", new TestDuplicateTableNameCols("TestDuplicateTableName"), new TestDuplicateTableNameIxCols("TestDuplicateTableName"));
^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
Message: The call is ambiguous between the following methods or properties: 'TestDuplicateTableNameCols.TestDuplicateTableNameCols(string)' and 'TestDuplicateTableNameCols.TestDuplicateTableNameCols(string)',
Severity: Error,
Descriptor: {
Id: CS0121,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0121),
MessageFormat: The call is ambiguous between the following methods or properties: '{0}' and '{1}',
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*
public global::SpacetimeDB.Table<global::InAnotherNamespace.TestDuplicateTableName, TestDuplicateTableNameCols, TestDuplicateTableNameIxCols> TestDuplicateTableName() =>
new("TestDuplicateTableName", new TestDuplicateTableNameCols("TestDuplicateTableName"), new TestDuplicateTableNameIxCols("TestDuplicateTableName"));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
Message: The call is ambiguous between the following methods or properties: 'TestDuplicateTableNameIxCols.TestDuplicateTableNameIxCols(string)' and 'TestDuplicateTableNameIxCols.TestDuplicateTableNameIxCols(string)',
Severity: Error,
Descriptor: {
Id: CS0121,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0121),
MessageFormat: The call is ambiguous between the following methods or properties: '{0}' and '{1}',
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*
public global::SpacetimeDB.Table<global::TestDuplicateTableName, TestDuplicateTableNameCols, TestDuplicateTableNameIxCols> TestDuplicateTableName() =>
new("TestDuplicateTableName", new TestDuplicateTableNameCols("TestDuplicateTableName"), new TestDuplicateTableNameIxCols("TestDuplicateTableName"));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
*/
Message: The call is ambiguous between the following methods or properties: 'TestDuplicateTableNameIxCols.TestDuplicateTableNameIxCols(string)' and 'TestDuplicateTableNameIxCols.TestDuplicateTableNameIxCols(string)',
Severity: Error,
Descriptor: {
Id: CS0121,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0121),
MessageFormat: The call is ambiguous between the following methods or properties: '{0}' and '{1}',
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*
}
public readonly struct TestDuplicateTableNameCols
^^^^^^^^^^^^^^^^^^^^^^^^^^
{
*/
Message: The namespace 'SpacetimeDB' already contains a definition for 'TestDuplicateTableNameCols',
Severity: Error,
Descriptor: {
Id: CS0101,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0101),
MessageFormat: The namespace '{1}' already contains a definition for '{0}',
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*

public readonly struct TestDuplicateTableNameIxCols
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{
*/
Message: The namespace 'SpacetimeDB' already contains a definition for 'TestDuplicateTableNameIxCols',
Severity: Error,
Descriptor: {
Id: CS0101,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0101),
MessageFormat: The namespace '{1}' already contains a definition for '{0}',
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*
Params: [],
ReturnType: new SpacetimeDB.BSATN.ValueOption<NotSpacetimeType, NotSpacetimeType.BSATN>().GetAlgebraicType(registrar)
Expand Down Expand Up @@ -391,6 +529,75 @@ SpacetimeDB.Internal.Module.RegisterClientVisibilityFilter(global::Module.MY_THI
}
},
{/*
{
public global::SpacetimeDB.Table<global::TestDuplicateTableName, TestDuplicateTableNameCols, TestDuplicateTableNameIxCols> TestDuplicateTableName() =>
^^^^^^^^^^^^^^^^^^^^^^
new("TestDuplicateTableName", new TestDuplicateTableNameCols("TestDuplicateTableName"), new TestDuplicateTableNameIxCols("TestDuplicateTableName"));
*/
Message: Type 'QueryBuilder' already defines a member called 'TestDuplicateTableName' with the same parameter types,
Severity: Error,
Descriptor: {
Id: CS0111,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0111),
MessageFormat: Type '{1}' already defines a member called '{0}' with the same parameter types,
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*

internal TestDuplicateTableNameCols(string tableName)
^^^^^^^^^^^^^^^^^^^^^^^^^^
{
*/
Message: Type 'TestDuplicateTableNameCols' already defines a member called 'TestDuplicateTableNameCols' with the same parameter types,
Severity: Error,
Descriptor: {
Id: CS0111,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0111),
MessageFormat: Type '{1}' already defines a member called '{0}' with the same parameter types,
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*

internal TestDuplicateTableNameIxCols(string tableName)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{
*/
Message: Type 'TestDuplicateTableNameIxCols' already defines a member called 'TestDuplicateTableNameIxCols' with the same parameter types,
Severity: Error,
Descriptor: {
Id: CS0111,
Title: ,
HelpLink: https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0111),
MessageFormat: Type '{1}' already defines a member called '{0}' with the same parameter types,
Category: Compiler,
DefaultSeverity: Error,
IsEnabledByDefault: true,
CustomTags: [
Compiler,
Telemetry,
NotConfigurable
]
}
},
{/*

partial struct TestTypeParams<T> : System.IEquatable<TestTypeParams>, SpacetimeDB.BSATN.IStructuralReadWrite {
^^^^^^^^^^^^^^
Expand Down
Loading
Loading