Commit Graph

62 Commits

Author SHA1 Message Date
Zeke Foppa cd71963efd Revert "Upgrade version to 1.12.0 (#4084)" (#4147)
# Description of Changes

This reverts the version bump, since it seems to be causing test
flakiness somehow.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [ ] CI passes

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
2026-01-28 17:47:24 +00:00
John Detter 2044a536b0 Upgrade version to 1.12.0 (#4084)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

Version upgrade to `v1.12.0`.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

1 - this is just a version upgrade

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

The testsuite failures are fixed by
https://github.com/clockworklabs/SpacetimeDB/pull/4120

- [x] License has been properly updated including version number and
date
- [x] CI passes

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-01-27 18:15:36 +00:00
John Detter 8ab3ef4a19 Version bump to 1.11.2 (#3977)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

- Version upgrade to `1.11.2`

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

- None, this is just a version bump

# Expected complexity level and risk

1 - no real changes here

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

- NA this is just a version bump, no functionality change here.
2026-01-08 18:55:30 +00:00
Mario Montoya 82d5a4f6c0 Implement SpacetimeType for Result<T, E> (#3790)
# Description of Changes

Closes #3673 

*NOTE*: C++ part will be in another PR

# Expected complexity level and risk

2

Adding a new type touch everywhere

# Testing

- [x] Adding smoke and unit test

---------

Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
Co-authored-by: Jason Larabie <jason@clockworklabs.io>
2026-01-08 15:50:18 +00:00
Ryan f906be6bd9 Fixed Nullable value-type fields in Views in C# module causing excessive logging (#3949)
# Description of Changes

This PR fixes a C# codegen performance/behavior issue triggered by views
that include nullable value-type fields (e.g. `DbVector2?`), as reported
in #3914.

* Updated the C# BSATN code generator to emit non-boxing equality for
`Nullable<T>` members by using `System.Nullable.Equals(a, b)` rather
than `a.Equals(b)` (which can box and cause excessive host logging/work
in view diff/equality paths).

This causes code generation to change from something like:
``` csharp
// From:
var ___eqNullableIntField = this.NullableIntField.Equals(that.NullableIntField);
// To:
var ___eqNullableIntField = System.Nullable.Equals(
    this.NullableIntField,
    that.NullableIntField
);
```
* Added a regression scenario to the C# regression-test module that
exercises the problematic pattern:
  * A table containing a nullable struct field (`DbVector2? Pos`).
  * A public view that returns rows containing that nullable field.
* A reducer to mutate the nullable field from `some` → `none` → `some`
to force view re-evaluation and diffing.
* Updated the regression-test client to:
  * Subscribe to the new view.
* Validate that the view evaluates successfully and contains the
expected rows.
  * Call the reducer and validate view state after updates.
  * Fail the test if view evaluation/diffing produces errors.

# API and ABI breaking changes

None.
* No changes to public SpacetimeDB schema or wire format semantics.
* Changes are limited to generated equality code and regression tests.

# Expected complexity level and risk

2 - Low
* The codegen change is small and localized (special-casing
`System.Nullable<T>` equality generation).
* Risk is primarily around subtle behavior differences in equality for
nullable value types; however, `System.Nullable.Equals` matches the
expected semantics and avoids boxing.
* Regression tests specifically cover the nullable-struct-in-view
scenario to guard against regressions.

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [X] Ran the C# regression test suite via `run-regression-tests.sh` and
confirmed no errors.
2026-01-06 17:56:05 +00:00
rekhoff 39f01289e5 C# implementation of Transactions for Procedures (#3809)
# Description of Changes

Implements the C# equivalent of #3638

This implement uses inheritance, where abstract base classes (like
`ProcedureContextBase` in `ProcedureContext.cs`) store the core of the
implementation, and then generated wrappers (like `ProcedureContext` in
the generated FFI.cs file) inherit from them.

For error handling, we work like Rust's implementation of `Result<T,E>`
but we require `where E : Exception` because of how exceptions work in
C#. Transaction-level failures come back as a `TxOutcome` and user
errors should follow the `Result<T,E>` pattern. In this implementation,
we have `UnwrapOrThrow()` throws exceptions directly because of C#'s
error handling pattern.

Unlike the Rust implementation's direct `Result` propagation, we are
using an `AbortGuard` pattern (in `ProcedureContext.cs`) for exception
handling, which uses `IDisposable` for automatic cleanup.

Most changes should have fairly similar Rust-equivalents beyond that.
For module authors, the changes here allow for the transation logic to
work like:
```csharp
ctx.TryWithTx<ResultType, Exception>(tx => {
    // transaction logic
    return Result<ResultType, Exception>.Ok(result);
});
```
This change includes a number of tests added to the
`sdks/csharp/examples~/regression-tests/`'s `server` and `client` to
validate the behavior of the changes. `server` changes provide further
usage examples for module authors.

# API and ABI breaking changes

Should not be a breaking change

# Expected complexity level and risk

2

# Testing

- [x] Created Regression Tests that show transitions in procedures
working in various ways, all of which pass.
2025-12-18 18:41:47 +00:00
John Detter eb5000895d Bump versions to 1.11.1 (#3901)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

- Bump version numbers to `1.11.1`

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

1

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

- [x] Verified that the license has been updated
- [x] `spacetime --version` on this commit is correct

There is also a corresponding private PR.
2025-12-18 16:35:50 +00:00
Zeke Foppa 141048cdd8 Bump versions to 1.11.0 (#3808)
# Description of Changes

Bumping versions to 1.11.0 in preparation for an upcoming release.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

- [x] Existing CI passes

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-12-02 22:45:29 +00:00
John Detter 0590f7022d Upgrade to version 1.10.0 (#3769)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

This upgrades the SpacetimeDB version to 1.10.0.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

1

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

This is just a version bump - not tested.
2025-11-26 17:55:26 +00:00
John Detter 77886a50a9 Upgrade to version 1.9.0 (#3709)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

Upgrade to version 1.9.0.

# API and ABI breaking changes

None - just a version upgrade.

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] I verified that the license has been updated
- [x] The version number looks correct (1.9.0)

---------

Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-11-22 01:22:40 +00:00
John Detter 6bd557254d Upgrade to version 1.8.0 (#3633)
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

- This upgrades the versions of all SDKs, the CLI, etc. to 1.8.0

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

1

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

- [x] I verified that all versions seem to be updated including the BSL
license update <!-- maybe a test you want to do -->

We have 1 `1.7.0` that didn't get upgraded automatically because it is
part of the module bindings for a template:

```
crates/cli/.templates/parent_parent_crates_bindings-typescript_examples_quickstart-chat/src/module_bindings/index.ts:    cliVersion: '1.7.0',
```

A case could possibly be made for bumping the template but it shouldn't
cause any issues as the module bindings directory should just get
regenerated by the user. @cloutiertyler should we be bumping module
bindings for templates when we upgrade versions?

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2025-11-12 12:21:09 +00:00
Zeke Foppa 34b4a2b899 Bump versions to 1.7.0 (#3550)
# Description of Changes

Bump versions to 1.7.0 in preparation for the release.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1

# Testing

- [x] CI passes

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-11-04 19:26:51 +00:00
Zeke Foppa d4837c37ab Bump versions to 1.6.0 (#3413)
# Description of Changes

Bumping versions to 1.6.0 in preparation for upcoming release.

# API and ABI breaking changes

None

# Expected complexity level and risk

1
# Testing

- [x] Existing CI only

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-10-16 01:26:35 +00:00
Zeke Foppa ea61c949e1 Bump versions to 1.5.0, update DLLs, and regenerate files (#3310)
# Description of Changes

Bumping versions to 1.5.0 since we have merged some new features (at the
very least, https://github.com/clockworklabs/SpacetimeDB/pull/3292)

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing
None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-30 18:18:47 +00:00
Zeke Foppa 32559048e6 Bump remaining versions to 1.4.0 (#3267)
# Description of Changes

Bumping remaining files so that everything is at 1.4.0.

# API and ABI breaking changes

None.

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-09-23 00:35:19 +00:00
james gilles 0d2a45b239 Fix fields named 'read' (#2525)
# Description of Changes

Fixes
https://github.com/orgs/clockworklabs/projects/22?pane=issue&itemId=102392974&issue=clockworklabs%7Ccom.clockworklabs.spacetimedbsdk%7C276

by renaming `internal` `static` serializer fields so that they do not
overlap with user-provided names.

Note, however, that some field names still will not work: `ReadFields`,
`WriteFields`, `Equals`, and `GetHashCode`.
This would require a separate fix since the error would happen in a
different place. In this case we would need to change the name of the
generated member to something like `ReadFields_` or `Equals_`, which I'm
not sure is a good idea.

# API and ABI breaking changes

N/A

# Expected complexity level and risk

0

# Testing

SDK tests and `dotnet-verify` tests are passing.

---------

Signed-off-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
2025-08-26 21:17:46 +00:00
Zeke Foppa e107144998 Bump versions to 1.3.0 (#3005)
# Description of Changes

Bumped all versions to 1.3.0 in preparation for an upcoming minor
release.

# API and ABI breaking changes

No breaking changes.

# Expected complexity level and risk

1

# Testing

None

---------

Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-07-30 19:16:16 +00:00
Zeke Foppa 67703b1fee Bump C# versions to 1.2.1 (#2890)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-23 17:34:38 +00:00
james gilles 971ae75b5d Improve serialization speed of enums without data in C# (#2762) 2025-06-20 17:38:29 +00:00
Zeke Foppa 380acf14c8 Bump versions to 1.2.0 (#2837)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-06-06 16:17:24 +00:00
Viktor Szépe f6da9e1f5f Fix typos (#2812)
Signed-off-by: Viktor Szépe <viktor@szepe.net>
2025-06-04 16:33:32 +00:00
Zeke Foppa ec26f526ed Bump C# versions (#2774)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-05-22 17:47:50 +00:00
james gilles 0d419afbfa Reduce reflection use in generated C# code (#2725) 2025-05-14 18:36:50 +00:00
james gilles 74ad4a14ce Fix Equals and GetHashCode for types containing Lists and Arrays in C# (#2710) 2025-05-12 18:11:01 +00:00
Zeke Foppa 3083c1b83e Bump versions to 1.1.1 (#2658)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-04-22 19:20:17 +00:00
Zeke Foppa c3c0d92fbe Bump versions to 1.1.0 (#2518)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-03-27 23:37:38 +00:00
james gilles f5e4663cb5 Implement IEquatable<Self> for all [SpacetimeDB.Type]s (#2396) 2025-03-12 18:59:34 +00:00
Zeke Foppa 8930e78f97 Bump versions to 1.0.1 (#2431)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-03-11 18:43:48 +00:00
Zeke Foppa 20f4bfbd21 Bump Rust and C# package versions to 1.0.0 (#2283)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Co-authored-by: John Detter <no-reply@boppygames.gg>
2025-02-28 20:13:07 +00:00
Zeke Foppa 20ab595b29 Bump version to 1.0.0-rc4 (#2177)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-01-27 22:54:36 +00:00
Tyler Cloutier 6f807e273c Updated version to 1.0.0-rc3 (#2059)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2025-01-08 18:17:10 +00:00
Ingvar Stepanyan 79a9c712f0 Implement new C# index syntax (#2078) 2025-01-07 20:58:17 +00:00
Ingvar Stepanyan 78b48c9a98 Reduce noisy C# compilation errors (#2067) 2024-12-30 23:48:50 +00:00
Ingvar Stepanyan 08a3f3210b Migrate C# ModuleDef to V9 (#1670) 2024-12-16 21:49:42 +00:00
Zeke Foppa 5bf5b2ba09 Bump C# versions to -hotfix1 (#1984)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-11-12 04:25:10 +00:00
Zeke Foppa 7de743d44d Bump C# bindings to 1.0.0 (#1913)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-10-29 00:23:49 +00:00
Mazdak Farrokhzad 06cc688885 No Maps for you! (#1770) 2024-10-15 22:34:13 +00:00
Jeremie Pelletier 02b70d5c94 c# client generate (#1707) 2024-10-04 04:12:15 +00:00
Ingvar Stepanyan 5ee077e6d9 [C#] [Reducers] Implement new context fields, enum-based kinds, validation (#1729) 2024-10-01 16:30:32 +00:00
Ingvar Stepanyan 49712bfbdf Add C# diagnostics support (#1688) 2024-09-27 19:07:08 +00:00
Ingvar Stepanyan 6ba91bbfc6 Minor attribute cleanups for C# module (#1753) 2024-09-27 15:43:40 +00:00
Ingvar Stepanyan 9f6239991b [C#] [NFC] Reuse attribute classes from runtime (#1718) 2024-09-23 16:47:30 +00:00
Ingvar Stepanyan 214eb7e047 NFC: enforce more C# code style + enable it in Visual Studio (#1687) 2024-09-16 19:29:33 +00:00
Ingvar Stepanyan 607f7ce6b8 Auto-generate C# ModuleDef bindings from Rust (#1680) 2024-09-09 18:22:17 +00:00
Ingvar Stepanyan 68e356519e C#: split table codegen logic from type codegen logic (#1573)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-09-05 18:00:40 +00:00
Ingvar Stepanyan 9f1b6dc254 NFC: enforce style for C# locally and on CI (#1567) 2024-08-21 16:21:45 +00:00
Zeke Foppa 2b7b9ff350 Bump version to 0.12.0 (#1578)
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
2024-08-09 19:10:53 +00:00
Mazdak Farrokhzad 1e8e18d74b Add support for I256 and U256 (#1477) 2024-08-08 18:40:35 +00:00
Ingvar Stepanyan db16a0959c Minor NFC improvements to C# Roslyn codegen (#1562) 2024-08-06 08:26:33 +00:00
Ingvar Stepanyan 30c000f6a9 C#: ignore fields in partial declaration not marked with BSATN attribute (#1545) 2024-07-25 16:32:15 +00:00