ably / ably-flutter

A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.
https://ably.com/download
Apache License 2.0
60 stars 16 forks source link

Consider re-adding explicit, manual lifecycle management of REST and Realtime instances to Example App #204

Open QuintinWillison opened 3 years ago

QuintinWillison commented 3 years ago

See my comment on @ben-xD's pull request where these buttons were removed.

┆Issue is synchronized with this Jira Task by Unito

ben-xD commented 3 years ago

I'm on the fence as to whether I'm truly in favour of this change, as the example app was originally designed to be very manually driven, which can be helpful when debugging as-yet-unidentified issues.

The example app can be painful and manual way to do QA testing, which has not worked effectively thus far, given the numerous bugs I've found in really basic areas, such as ChannelOptions: calling a method like channel.setOptions crashes the app. This happened because the method implementation was copy-pasted from an unrelated platform method, and not updated at all. 🙈 If it were tested, we can see the test coverage, and see that those lines were not executed (if they were we'd know they were flawed as they crash the app). If we rely on the example app, we rely on 2 things:

Problems: why I fixed it

Big issues to focus on

IMHO Both these things are much more valuable (external + internal developer experience and Ably developer productivity) than this issue.

ben-xD commented 2 years ago

Please see a bug I discovered and fixed because I made the changes to remove manual realtime client instantiation: https://github.com/ably/ably-flutter/pull/249