Skip to content

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 06 Jul 19:23
· 43 commits to main since this release

Release v0.1.3

This is a major reliability and developer experience release focused on ensuring the code you generate is correct and robust from the start. The highlight is the introduction of an automated validation step for both Python and Rust, and a complete overhaul of the Rust client's deserialization logic for improved correctness and performance.

✨ New Features & Major Improvements

🤖 Automated Code Validation (dev mode)

The dev mode is now significantly more robust. Before writing a new client file to your project, the generator will first validate it in a self-contained sandbox environment to ensure it is syntactically correct and type-safe.

  • For Rust: The generator runs cargo check on the generated module. This catches any compilation errors (like trait bounds, lifetime issues, or incorrect types) before the file is ever saved to your project.

  • For Python: The generator runs mypy with a strict configuration on the generated module. It uses a self-contained environment with type stubs, meaning no pip install is required for validation to work.

This provides a strong guarantee that the generated code is always valid and won't break your application's build process.

🦀 Robust Rust Deserialization (TryFrom<Value>)

The entire deserialization logic for the Rust client has been refactored for correctness and performance.

  • No More serde_json Bridge: We no longer use serde_json as an intermediate step for deserialization. Instead, the generator now creates a manual impl TryFrom<convex::Value> for MyStruct for every generated type.

  • Correct Type Handling: This new approach correctly handles all Convex-specific types. It permanently fixes all known issues with deserializing i64, Id<T>, Vec<u8>, and complex nested objects and arrays.

⚙️ Developer Experience & Bug Fixes

  • New validation_path Config: The convex-parser.yaml file now supports an optional validation_path key, allowing you to specify a custom directory for the validation sandbox projects.

  • Updated init Command: The convex-schema-parser init command has been updated to include the new validation_path in the default generated config file.

  • Improved Test Coverage: Added new test cases for complex serialization and deserialization scenarios in Rust.

  • Documentation: The README.md has been updated to reflect the latest features and improvements.