-
Notifications
You must be signed in to change notification settings - Fork 663
cli: pre-publish endpoint call. #3278
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
Merged
Merged
Conversation
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
Shubham8287
commented
Sep 23, 2025
3a0e6bd to
49cfb51
Compare
cb0d206 to
6ef506d
Compare
c87c871 to
09d9377
Compare
Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io> Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
47954f5 to
a970761
Compare
gefjon
approved these changes
Sep 26, 2025
bfops
reviewed
Sep 26, 2025
1 task
bfops
reviewed
Sep 26, 2025
bfops
approved these changes
Sep 26, 2025
Collaborator
bfops
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some nits, but my codeowned changes lgtm
Shubham8287
commented
Sep 26, 2025
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com> Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
50c6d72 to
af44921
Compare
Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
ee03bd2 to
c6a0497
Compare
c6a0497 to
b59dc1f
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 6, 2025
# Description of Changes This is the implementation of issue #3191. This adds a Default attribute to C# module fields. **Note**: In C#, attribute arguments must be compile-time constants, which means you can't directly use non-constant expressions like new expressions, method calls, or dynamic values in attribute constructors. (Ref: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes#2324-attribute-parameter-types) For this reason, these default values are limited to primitive types, enums, and strings. This includes (shown as `C# Type` (`BSATN type`): * `bool` (`Bool`) * `sbyte` (`I8`) * `byte` (`U8`) * `short` (`I16`) * `ushort` (`U16`) * `int` (`I32`) * `unit` (`U32`) * `long` (`I64`) * `ulong` (`U64`) * `float` (`F32`) * `double` (`F64`) * `enum` (`Enum`) * `string` (`String`) * `null` (`RefOption`) <- Nullable type Because of C# limitations, for nullable and complex data types, such as a struct, can take use `[Default(null)]` to populate values with null defaults. This allows things like structs to workaround the non-constant expressions in attribute constructors limitation by allowing these complex types to still be able to be added as new column tables. The `int` type can also be in the form of Hex or Binary literals, such as `[Default(0x2A)]` or `[Default(0b00101010)]` Both Decimal (like `[Default(3.14m)]`) and Char (like `[Default('A')]`) are unsupported types in BSATN and will still return `BSATN0001` errors. # API and ABI breaking changes Not API breaking. This change only adds the `[Default(value)]` attribute logic. Using the `[Default(value)]` attribute with older versions SpacetimeDB C# modules will result in an error. # Expected complexity level and risk 2 # Testing Local testing of this requires use of CLI changes in #3278 - [x] Regression test of functionality added.
bfops
added a commit
that referenced
this pull request
Oct 8, 2025
# Description of Changes PR contains: * CLI changes for the `pre_publish` endpoint when publishing a module. * The regular `--yes` flag will not bypasses the *break clients* warning prompt — an extra confirmation is now required. For CI, a hidden flag `--break-clients` is added. * Added smoketest. * Some trivial naming changes in `client-api-*` crates for consistency reasons. * `pre_publish` route to accept similar Body size limit as `publish` route. # API and ABI breaking changes an additive API change, does not break anything. # Expected complexity level and risk 2 # Testing - Existing smoketests passing for backward compatibility. - New smoketest for add columns --------- Signed-off-by: Shubham Mishra <shivam828787@gmail.com> Co-authored-by: Phoebe Goldman <phoebe@clockworklabs.io> Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
bfops
pushed a commit
that referenced
this pull request
Oct 16, 2025
# Description of Changes This is the implementation of issue #3191. This adds a Default attribute to C# module fields. **Note**: In C#, attribute arguments must be compile-time constants, which means you can't directly use non-constant expressions like new expressions, method calls, or dynamic values in attribute constructors. (Ref: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/attributes#2324-attribute-parameter-types) For this reason, these default values are limited to primitive types, enums, and strings. This includes (shown as `C# Type` (`BSATN type`): * `bool` (`Bool`) * `sbyte` (`I8`) * `byte` (`U8`) * `short` (`I16`) * `ushort` (`U16`) * `int` (`I32`) * `unit` (`U32`) * `long` (`I64`) * `ulong` (`U64`) * `float` (`F32`) * `double` (`F64`) * `enum` (`Enum`) * `string` (`String`) * `null` (`RefOption`) <- Nullable type Because of C# limitations, for nullable and complex data types, such as a struct, can take use `[Default(null)]` to populate values with null defaults. This allows things like structs to workaround the non-constant expressions in attribute constructors limitation by allowing these complex types to still be able to be added as new column tables. The `int` type can also be in the form of Hex or Binary literals, such as `[Default(0x2A)]` or `[Default(0b00101010)]` Both Decimal (like `[Default(3.14m)]`) and Char (like `[Default('A')]`) are unsupported types in BSATN and will still return `BSATN0001` errors. # API and ABI breaking changes Not API breaking. This change only adds the `[Default(value)]` attribute logic. Using the `[Default(value)]` attribute with older versions SpacetimeDB C# modules will result in an error. # Expected complexity level and risk 2 # Testing Local testing of this requires use of CLI changes in #3278 - [x] Regression test of functionality added.
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
PR contains:
pre_publishendpoint when publishing a module.--yesflag will not bypasses the break clients warning prompt — an extra confirmation is now required. For CI, a hidden flag--break-clientsis added.client-api-*crates for consistency reasons.pre_publishroute to accept similar Body size limit aspublishroute.API and ABI breaking changes
an additive API change, does not break anything.
Expected complexity level and risk
2
Testing