Skip to content

Stable version with pg extension and stable sdk's for typescript and dart#189

Merged
jamals86 merged 2 commits intomainfrom
027-pg-transactions
Mar 31, 2026
Merged

Stable version with pg extension and stable sdk's for typescript and dart#189
jamals86 merged 2 commits intomainfrom
027-pg-transactions

Conversation

@jamals86
Copy link
Copy Markdown
Collaborator

This pull request introduces improvements to the Dart client SDK for KalamDB, focusing on more robust authentication handling during WebSocket reconnections and fine-tuning reconnection parameters for mobile environments. It also includes dependency updates, version bumps, and test enhancements to ensure these changes are reliable.

Dart SDK: Authentication & Reconnection Improvements

  • Added logic to detect authentication-related errors during manual WebSocket reconnection in KalamClient, so that the client will refresh credentials and retry once if an auth error is detected. This makes reconnects more reliable, especially when tokens expire. [1] [2]
  • Introduced helper method _isLikelyReconnectAuthError to identify auth-related failures by matching error messages against common authentication keywords.

Connection Options: Mobile-Friendly Reconnection

  • Set lower initial and maximum reconnect delays for Dart clients to better support frequent resume/reconnect scenarios typical in mobile apps. These are now explicitly set in build_dart_connection_options and validated by new tests. [1] [2] [3] [4] [5]

Testing Enhancements

  • Expanded test coverage to verify the new reconnection and authentication logic, including scenarios for JWT reuse and forced auth refresh on reconnect failures. Mock API was extended to simulate connection failures and auth errors. [1] [2] [3] [4]

Dependency and Version Updates

  • Updated flutter_rust_bridge dependency to ^2.12.0 and bumped Dart SDK and Rust crate versions to release candidate versions (0.4.2-rc.1/0.4.2-rc1). [1] [2] [3]

Build and WASM Packaging

  • Updated WASM build instructions to use the --no-opt flag with wasm-pack for more predictable output, and minor changes to generated JS bindings for compatibility. [1] [2] [3] [4] [5] [6]

Update generated web package artifacts and build instructions for the Dart SDK bindings. Changes include: adding --no-opt to wasm-pack build invocations in README, regenerating JS/TS/WASM artifacts (kalam_link_dart.js, .d.ts, .wasm and .wasm.d.ts) which introduce ProtocolOptions, CompressionType and SerializationType types and add protocol info to ServerMessage; rename/rehash numerous wasm-bindgen import/export symbols and adjust closure/FinalizationRegistry handling and exports (__wbindgen_export*); add queueMicrotask/send overload for binary data and other JS runtime interop updates. Also updates bundled native binaries for Android (arm64-v8a and x86_64) and iOS static library.
Prepare a release candidate: update workspace version in Cargo.toml and propagate 0.4.2-rc1 across many Rust packages in Cargo.lock. Upgrade Dart SDK package to 0.4.2-rc.1 and bump flutter_rust_bridge to ^2.12.0 (pubspec.lock updated with new sha and version). Refresh generated web artifacts (pkg JS/WASM) and replace native Dart/Flutter binaries (Android/iOS). Also update TypeScript and UI package versions to rc releases.
@jamals86 jamals86 merged commit 1d35c29 into main Mar 31, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant