Repository navigation
Conversation
The SDK now offers a realtime interface only. `Rest`, `RestChannel`, `RestChannels`, `RestPresence`, `RestAuth` and the `Rest*` option and param types are gone, along with their platform methods, codec types and Android/iOS handlers. `Push` and `PushChannel` now require a `realtime` client, and `Message`/`PresenceMessage.fromEncoded` take `RealtimeChannelOptions`. UPDATING.md documents the migration. Two pieces of pre-existing drift had to be fixed to regenerate the platform constants: - The codegen templates used `_` as a lambda parameter, which is a wildcard in current Dart, so `bin/codegen.dart` no longer ran. - The generated constants had been hand-edited with entries missing from the codegen context (`connectionRecoveryKey`, the `ConnectionStateChange` connection id/key, and three Java-only `ClientOptions` timeout keys); these are now in the context so regeneration reproduces them on all three platforms. Tests: the rest unit and integration tests are deleted; the shared `Channels` test moves to `RealtimeChannels`, the plugin test covers client creation over `Realtime`, and the realtime auth tests bootstrap their tokens from a non-auto-connecting `Realtime` client. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 183 files, which is 83 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configuration
⛔ Files ignored due to path filters: 6
📒 Files selected for processing: 183
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Following the rename of this SDK to Ably Pub/Sub, rename the published Dart package from `ably_flutter` to `ably_pubsub_device_flutter`, so the package name matches the product. The rename reaches further than `pubspec.yaml` because several names are derived from the package name: - The library entry point moves to `lib/ably_pubsub_device_flutter.dart`, and every `package:ably_flutter/…` import follows. Import blocks are re-sorted where the new name changes their alphabetical order. - Flutter resolves a plugin's podspec by package name, so the podspec is renamed too. That in turn renames the Swift module, so the ObjC sources now import `<ably_pubsub_device_flutter/…-Swift.h>`, and the iOS CI job builds the `ably_pubsub_device_flutter-Unit-Tests` scheme CocoaPods generates from it. - `android/settings.gradle` names the Gradle project, and the example's Xcode project names the framework it embeds. Both `Podfile.lock`s are regenerated with `pod install` so their spec checksums are real, and the three `pubspec.lock`s with `flutter pub get`. Method channel names and the `io.ably.ably_flutter.PUSH_*` broadcast actions keep their current values, as wire identifiers shared with the platform side. The example, integration test and test harness packages keep their own names. `UPDATING.md` gains a migration note covering the dependency, the import path and the iOS module. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ttypic
force-pushed
the
integration/v2
branch
from
September 21, 2026 19:40
4845f48 to
ea51456
Compare
Following the rename of this SDK to Ably Pub/Sub, and the removal of the REST client, the single remaining client is renamed from `Realtime` to `PubSubClient` to match the product name. The declaring file moves to `pub_sub_client.dart` accordingly. Only the class is renamed. The `realtime` properties on `Connection`, `RealtimeChannel`, `RealtimeChannels`, `Push` and `PushChannel`, the `realtimeInstances` getter, and the platform channel method names all keep their current names. Unit and integration tests are updated to construct `PubSubClient`; they cover the same behaviour as before. `UPDATING.md` gains a migration note for the new name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Make `PubSubClient`'s constructor private and expose a single top-level
`createClient({required ClientOptions options})` function as the only way
to obtain a client. A factory function keeps the construction path open
for future changes — validation, caching, returning a subtype — without
another breaking change to the public surface.
This also removes the two key shorthands, `PubSubClient.fromKey(key)` and
the `key` parameter. They duplicated `ClientOptions(key: ...)`, which
`fromKey` delegated to anyway, and the either/or `options`/`key`
signature was only enforced by an assert. Callers now pass the key
through `ClientOptions`, so behaviour is unchanged. The four call sites
that passed both `options` and `key` keep only `options`, which is what
took effect before.
`options` becomes a final field, as it is now always set at construction.
Unit and integration tests construct clients through `createClient` and
cover the same behaviour as before.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Clear out the API that earlier versions marked deprecated, now that a major release allows it: - `Connection.recoveryKey`, superseded by `createRecoveryKey()`. - `ClientOptions.logHandler` and the `LogHandler` typedef. These never did anything — the codec carried a `TODO handle logHandler` where the encoding would have gone, and log output is handled by the underlying native SDK. - `ClientOptions.fallbackHostsUseDefault`, which had no replacement. - `ClientOptions.fromKey()` and `AuthOptions.fromKey()`, superseded by the constructors' named `key` parameter. `fallbackHostsUseDefault` was plumbed over the platform channel, so it also goes from `bin/codegen_context.dart` — regenerating the Dart, Java and Obj-C constants — from the Dart codec, and from the Java and Obj-C readers. Dropping the Obj-C read removes the deprecation warning ably-cocoa emitted for that property. Three doc comments referred to members this commit deletes, and are rewritten to describe what replaces them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Spec 6.3.0 replaces RTS4a, under which release() detaches a channel that is not already INITIALIZED, DETACHED or FAILED before removing it, with RTS4c-e: release() of a channel in any other state must fail with error 90011 and leave the channel in place. That check is done by the platform SDKs (ably-java, ably-cocoa) in their next major versions. release() previously fired the platform call without awaiting it and dropped the Dart-side channel unconditionally, so a platform error would have been lost as an unhandled async error while the Dart and platform collections diverged. It now returns a Future that completes with the platform's AblyException, and only removes the Dart-side channel once the platform release has succeeded. The state check is deliberately left to the platform SDK, because RealtimeChannel.state is updated asynchronously from platform events and so can lag behind the platform channel's state. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rename to PubSubClient, drop deprecated methods
feat!: make RealtimeChannels.release() async and surface platform errors
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integration branch contains packages split, renaming and deletion of deprecated methods