Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,8 @@ jobs:
run: dotnet restore --configfile ../../../NuGet.Config blackholio.csproj

- name: Build Godot project
run: godot --headless --verbose --path demo/Blackholio/client-godot --build-solutions --quit
working-directory: demo/Blackholio/client-godot
run: godot --headless --verbose --build-solutions --quit

- name: Start SpacetimeDB
run: |
Expand All @@ -898,7 +899,8 @@ jobs:
bash ./publish.sh

- name: Run Godot tests
run: godot --headless --path demo/Blackholio/client-godot --scene res://tests/GodotPlayModeTests.tscn
working-directory: demo/Blackholio/client-godot
run: godot --headless --scene res://tests/GodotPlayModeTests.tscn

csharp-testsuite:
needs: [lints]
Expand Down
5 changes: 2 additions & 3 deletions crates/bindings-csharp/Runtime/Internal/Bounds.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System.IO;
using SpacetimeDB.BSATN;

namespace SpacetimeDB
{
public readonly struct Bound<T>(T min, T max)
Expand All @@ -16,6 +13,8 @@ public readonly struct Bound<T>(T min, T max)

namespace SpacetimeDB.Internal
{
using SpacetimeDB.BSATN;

enum BoundVariant : byte
{
Inclusive,
Expand Down
2 changes: 1 addition & 1 deletion crates/bindings-csharp/Runtime/Internal/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ BytesSink error
}
catch (Exception e)
{
var error_str = e.Message ?? e.GetType().FullName;
var error_str = e.Message;
var error_bytes = System.Text.Encoding.UTF8.GetBytes(error_str);
error.Write(error_bytes);
return Errno.HOST_CALL_FAILURE;
Expand Down
8 changes: 4 additions & 4 deletions crates/bindings-csharp/Runtime/TransactionalContextState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,26 +79,26 @@ Func<TTxContext, Result<TResult, TError>> body
}
}

private long StartMutTx()
private static long StartMutTx()
{
var status = FFI.procedure_start_mut_tx(out var micros);
FFI.ErrnoHelpers.ThrowIfError(status);
return micros;
}

private void CommitMutTx()
private static void CommitMutTx()
{
var status = FFI.procedure_commit_mut_tx();
FFI.ErrnoHelpers.ThrowIfError(status);
}

private void AbortMutTx()
private static void AbortMutTx()
{
var status = FFI.procedure_abort_mut_tx();
FFI.ErrnoHelpers.ThrowIfError(status);
}

private bool CommitMutTxWithRetry(Func<bool> retryBody)
private static bool CommitMutTxWithRetry(Func<bool> retryBody)
{
try
{
Expand Down
4 changes: 2 additions & 2 deletions sdks/csharp/src/SpacetimeDBClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -133,6 +132,8 @@ public abstract class DbConnectionBase<DbConnection, Tables, Reducer> : IDbConne
where DbConnection : DbConnectionBase<DbConnection, Tables, Reducer>, new()
where Tables : RemoteTablesBase
{
internal const bool IsTesting = false;

public static DbConnectionBuilder<DbConnection> Builder() => new();

internal event Action<Identity, string>? onConnect;
Expand Down Expand Up @@ -281,7 +282,6 @@ internal struct ParsedMessage
private readonly BlockingCollection<ParsedMessage> _applyQueue =
new(new ConcurrentQueue<ParsedMessage>());

internal static bool IsTesting;
internal bool HasMessageToApply => _applyQueue.Count > 0;

private readonly CancellationTokenSource _parseCancellationTokenSource = new();
Expand Down
Loading