Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ios rest #4

Merged
merged 9 commits into from
May 5, 2020
Merged

Feature/ios rest #4

merged 9 commits into from
May 5, 2020

Conversation

tiholic
Copy link
Contributor

@tiholic tiholic commented Apr 28, 2020

Rest implementation for iOS part of the plugin.
Create a rest instance over ably instance and publish messages.

  • dev dependency upgrades
  • log levels on dart side brought to sync with spec

Copy link
Contributor

@QuintinWillison QuintinWillison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing major in my comments - mainly food for thought.

It might be worth discussing next week bringing in checkstyle (or similar) for the Java code and perhaps switching on some of the stricter build and analysis checks for the Objective-C code... in both cases they can help spot simple issues at build, before they reach review.

example/ios/Runner.xcodeproj/project.pbxproj Show resolved Hide resolved
ios/Classes/AblyFlutterPlugin.m Show resolved Hide resolved
ios/Classes/AblyFlutterPlugin.m Outdated Show resolved Hide resolved
ios/Classes/AblyFlutterPlugin.m Show resolved Hide resolved
Copy link
Member

@mattheworiordan mattheworiordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tiholic.

I think my only feedback is:

  • Saying you'll address a comment in a subsequent PR is fine if that PR is a new feature / capability. / spec item. However, if the subsequent PR fixes an issue in this PR, then the whole point of a review of code is to ensure we are happy with the code within this PR landing. Please have a think about how we can avoid this in future.
  • I am struggling to comprehend what the interface is that our customers will be using with our Flutter SDK. Please can you ensure you update the README as you go along so that I can get a sense of this. From my perspective, the developer experience is absolutely the highest priority, so I want to see what that looks like.
  • Do you think anything we are doing is not idiomatic for Dart/Flutter right now? I read https://blog.garrytan.com/masterclass-with-algolia-how-to-capture-the-heart-of-20m-software-developers the other day, and read about how Algolia preferred idiomatic code over consistency, whereas we prefer consistency where possible (but not always). I'd like to understand where you think we stand with this SDK in terms of idiomatic Dart vs Ably consistency in our APIs we present to our customers.

example/ios/Runner.xcodeproj/project.pbxproj Show resolved Hide resolved
ios/Classes/AblyFlutterPlugin.m Show resolved Hide resolved
ios/Classes/AblyFlutterPlugin.m Show resolved Hide resolved
lib/src/spec/constants.dart Outdated Show resolved Hide resolved
@tiholic
Copy link
Contributor Author

tiholic commented May 3, 2020

@mattheworiordan
Regarding PR Resolution and README, will take care.

Coming to the idiomatic vs. consistency, as we are pretty consistent in terms on simple method calls. In context of event listeners, we will be having idiomatic approach using Streams.

We are not inclined to following idiomatic approach w.r.t usage of named constructors. Standard constructors with asserts in initializer list is preferred over named constructors as that is most consistent with IDL.

@mattheworiordan
Copy link
Member

Coming to the idiomatic vs. consistency, as we are pretty consistent in terms on simple method calls. In context of event listeners, we will be having idiomatic approach using Streams.

Sounds good.

We are not inclined to following idiomatic approach w.r.t usage of named constructors. Standard constructors with asserts in initializer list is preferred over named constructors as that is most consistent with IDL.

Great, any reason not to do the latter then?

@tiholic
Copy link
Contributor Author

tiholic commented May 5, 2020

Great, any reason not to do the latter then?

Only reason is that the former is more consistent with IDL.

@paddybyers @QuintinWillison and @Ugbot please share your inputs. We finalized this approach over the call.

Rohit R. Abbadi and others added 3 commits May 5, 2020 09:44
- Dart side will not pass the key if it does't have a value
- Obj-C side will query incoming _dataMap for key which will return `nil` as key will not be available
@tiholic
Copy link
Contributor Author

tiholic commented May 5, 2020

@mattheworiordan had a long discussion with @QuintinWillison and we decided to follow idiomatic approach over consistency in case of named constructors.

Code not following idiomatic approach will be updated in PRs raised here further.

@tiholic tiholic merged commit 2418aa5 into master May 5, 2020
@tiholic tiholic deleted the feature/ios_rest branch May 7, 2020 20:27
QuintinWillison added a commit that referenced this pull request Mar 19, 2021
Hoping to solve this error in workflow environment:

Unhandled exception:
Invalid argument (uri): Unknown package: Instance of '_SimpleUri'
#0      _resolveUri.<anonymous closure> (package:dartdoc/src/generator/resource_loader.dart:34:9)
#1      _RootZone.runUnary (dart:async/zone.dart:1612:54)
#2      _FutureListener.handleValue (dart:async/future_impl.dart:152:18)
#3      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:704:45)
#4      Future._propagateToListeners (dart:async/future_impl.dart:733:32)
#5      Future._completeWithValue (dart:async/future_impl.dart:539:5)
#6      Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:577:7)
#7      _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#8      _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#9      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)
#10     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)
Error: Process completed with exit code 255.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants