Full report with minimal repro: #5740
Short version: a TS library that depends on spacetimedb and exports table() handles produces a silently corrupted schema when a consumer (with its own SDK copy, e.g. via link:/file: or any unhoisted duplicate) passes those handles into schema(). Publish succeeds with wrong row types, then reducers fatal at runtime.
Requested outcome, either is acceptable:
- Make foreign-copy handles work (structural interning), or
- Fail loudly at module load with a clear TypeError.
This currently forces the dependency-injection pattern in spacetime-retry-ts and @spacetimedb/cron (spacetimeCron({ table, t, ScheduleAt }), see clockworklabs/SpacetimeDBComponents#3); fixing it in the "make it work" direction lets those libraries drop injection.
cc @cloutiertyler
Full report with minimal repro: #5740
Short version: a TS library that depends on
spacetimedband exportstable()handles produces a silently corrupted schema when a consumer (with its own SDK copy, e.g. vialink:/file:or any unhoisted duplicate) passes those handles intoschema(). Publish succeeds with wrong row types, then reducers fatal at runtime.Requested outcome, either is acceptable:
This currently forces the dependency-injection pattern in
spacetime-retry-tsand@spacetimedb/cron(spacetimeCron({ table, t, ScheduleAt }), see clockworklabs/SpacetimeDBComponents#3); fixing it in the "make it work" direction lets those libraries drop injection.cc @cloutiertyler