SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Make `ScheduleAt` special + `Typespace::is_valid_for_client_code_generation`

Open kazimuth opened this issue 1 year ago • 0 comments

Description of Changes

This PR does 2 things:

  • It makes the ScheduleAt type special, and reworks the is_special infrastructure a little. Now we have SumType::is_special and AlgebraicType::is_special in addition to ProductType::is_special. I also reordered ScheduleAt so that its variants are in alphabetical order, in preparation for the upcoming "default element ordering" changes.

  • It renames some things in sats to get rid of the name "nominal normal form", which by all accounts was confusing to everybody. The new APIs are named:

    • AlgebraicType::is_valid_for_client_type_definition
    • AlgebraicType::is_valid_for_client_type_use
    • Typespace::is_valid_for_client_code_generation

API and ABI breaking changes

This is an API and ABI break.

Expected complexity level and risk

  1. I have a sneaking suspicion this may break client code generation in odd ways. The new AlgebraicType::is_special may also need to be integrated in various places.

Testing

Running test suite, I'd also like to check how badly this breaks Bitcraft & the SDKs...

kazimuth avatar Aug 14 '24 19:08 kazimuth