mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-06 07:26:43 -04:00
aeeb35f0bb
# Description of Changes Title. When validating column type changes in `Table::change_columns_to` and comparing layouts in `RowTypeLayout::is_compatible_with`, return structured error objects which describe the mismatch. I made this change while debugging the issue that led to #3203 , where `change_columns_to` returned an error during replay of an automigration which had succeeded the first time. The original error contained enough information to debug, but it was presented in a noisy and unhelpful way, so I wrote this patch to get better diagnostics. Per @Centril 's comments, these errors are for internal assertions, not user-facing error reporting, so we value fail-fast rather than error hygiene and choose not to use the `ErrorStream` combinator. Also note that I sprinkled `Box`es around some large-ish error types to quiet https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err . # API and ABI breaking changes N/a # Expected complexity level and risk 1. # Testing Manual testing with BitCraft. As this is purely altering the error reporting for non-user-facing assertions, I don't believe any further testing is necessary.
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.