Based on #1897 . While writing that PR, I moved a definition from db_connection.rs to client_cache.rs. This needlessly broke codegen.
Rather than having the codegen rely on a whole bunch of different #[doc(hidden)] pub mods in the SDK library by path, group every name the codegen refers to under spacetimedb_sdk::__codegen. This has several benefits:
It makes very clear that users should not be referring to those interfaces.
It allows us to move definitions around in the SDK library without changing the codegen, so long as we update the re-exports from the __codegen module.
In a similar vein, the unstable interface Cloud use(s|d) to set its client address is moved to spacetimedb_sdk::unstable. This may end up getting removed anyways; I'm not sure what the plan is going forward for how cloud nodes will identify themselves.
API and ABI breaking changes
Breaks codegen. Minor user-facing breakage: u256, i256 are now re-exported from the SDK root rather than via the spacetimedb_sdk::sats::{u256, i256}. The sats crate is no longer fully re-exported, so users who want it will need a separate dependency.
Description of Changes
Based on #1897 . While writing that PR, I moved a definition from
db_connection.rs
toclient_cache.rs
. This needlessly broke codegen.Rather than having the codegen rely on a whole bunch of different
#[doc(hidden)] pub mod
s in the SDK library by path, group every name the codegen refers to underspacetimedb_sdk::__codegen
. This has several benefits:__codegen
module.In a similar vein, the unstable interface Cloud use(s|d) to set its client address is moved to
spacetimedb_sdk::unstable
. This may end up getting removed anyways; I'm not sure what the plan is going forward for how cloud nodes will identify themselves.API and ABI breaking changes
Breaks codegen. Minor user-facing breakage:
u256, i256
are now re-exported from the SDK root rather than via thespacetimedb_sdk::sats::{u256, i256}
. Thesats
crate is no longer fully re-exported, so users who want it will need a separate dependency.Expected complexity level and risk
1
Testing