clockworklabs / clockworklabs/SpacetimeDB

Remove support for #[sats(name = "SumNamespace.SumType")]

Open
#2,174 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

Custom #[sats(name = "SumNamespace.SumType")] syntax is allowed only for sum types and only in C# output. It was preserved for a long time for BitCraft backward compat. We don't support it anywhere else - in other languages the dot will be ignored and the type will be generated as just SumNamespaceSumType - and it's not part of our official API.

After talking with @aasoni, he confirmed BitCraft can easily migrate away from this syntax, so we should be able to remove it from SpacetimeDB as well, which should simplify a few places in the codebase. It will also close https://github.com/clockworklabs/SpacetimeDB/issues/1591 and https://github.com/clockworklabs/SpacetimeDBPrivate/issues/953. cc @kazimuth

In the new C# codegen I'm just assuming that we don't need this feature, and aligning the generated type with other languages (emitting a flattened SumNamespaceSumType), but not removing other places that handle such names. This issue is meant to track such hard-deprecation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies custom #[sats(name = "SumNamespace.SumType")] syntax, sum types, and C# codegen as the scope, but names no files or tests. Start by tracing existing handling of this attribute across output languages and compare the generated C# name with other languages. Done when the deprecated support is removed consistently and the linked compatibility issues can be closed.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, rust
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.