fix(update): check version exists before confirming uninstall by euxaristia · Pull Request #4774 · clockworklabs/SpacetimeDB
and others added 2 commits
April 10, 2026 01:17Rewrite the core C++ type registration and FFI dispatch layer from crates/bindings-cpp in Rust. The new crate provides: - ModuleTypeRegistration: full SATS type registration with circular reference detection, error module generation, and BSATN serialization - FFI dispatch: __describe_module__, __call_reducer__, __call_view__, __call_view_anon__, __call_procedure__ with proper Identity/ConnectionId reconstruction and BytesSource/BytesSink I/O - Preinit functions: __preinit__01_clear_global_state and __preinit__99_validate_types matching the C++ originals Replaces ~1,414 lines of C++ with ~1,139 lines of Rust (19% reduction) plus 96 unit tests (100% coverage). Clippy-clean and fmt-clean.
Previously, `spacetime version uninstall <ver>` would show a y/N
confirmation prompt even when the version wasn't installed, then fail
with a cryptic "No such file or directory (os error 2)" after the user
confirmed.
Now the command checks if the version directory exists before prompting,
and returns a clear error: "v{ver} is not installed".
Added 4 unit tests covering:
- Nonexistent version errors before prompt
- Current version cannot be uninstalled
- "current" keyword cannot be uninstalled
- Successful uninstall removes the version directory
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters