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

General adjustment to API spec. #204

Merged
merged 31 commits into from
Feb 15, 2016
Merged

General adjustment to API spec. #204

merged 31 commits into from
Feb 15, 2016

Conversation

tcard
Copy link
Contributor

@tcard tcard commented Feb 9, 2016

This pull request is a rather big chain of fixes to adjust to the API spec.

Because most commits rely on some changes from previous commits in the chain, it's not possible to separate them in independent pull requests, so rather than have a series of pull requests each waiting on the previous one to be merged I'm just pushing them all together. It's probably easier to review each commit than the whole thing at once.

Sorry I didn't do this more gradually, but I often edited old commits as I discovered things to fix in an old commit's concern.

@tcard tcard force-pushed the adjust-api-spec branch 3 times, most recently from a0e3f92 to 29b80f6 Compare February 9, 2016 16:09

## Manual Installation
You can install Ably for iOS either thorugh CocoaPods or manually.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: thorugh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed at 493e0bf.

@mattheworiordan
Copy link
Member

@tcard wow, this is a MEGA PR :)
I am quite sad to see how far from the API the client library was, but am impressed at how much you've fixed in this PR. A big 👍

**Objective-C**

```objective-c
[ARTTestUtil testRealtime:options callback:^(ARTRealtime *client) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this example use ARTTestUtil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, no. I copypasted more than appropriate from the test. Fixed at 493e0bf.

@@ -424,23 +404,22 @@ - (ARTErrorInfo *)attach {
[self.realtime send:attachMessage cb:nil];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to pass the cb, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, good catch. Fixed at 0e36e0b.

@ricardopereira
Copy link
Contributor

👏🏻👏🏻👏🏻 Great work.
I contributed in some of the API inconsistency and I'm sorry.
Luckily, I'm learning a lot with you guys. Ty.

@ricardopereira ricardopereira mentioned this pull request Feb 10, 2016
@ricardopereira ricardopereira mentioned this pull request Feb 12, 2016
@tcard tcard mentioned this pull request Feb 12, 2016
@ricardopereira ricardopereira mentioned this pull request Feb 12, 2016
@tcard
Copy link
Contributor Author

tcard commented Feb 12, 2016

OK, I finally got all tests passing in my machine. Let's see what the CI says, but it should be mergeable now after your LGTM. @ricardopereira @mattheworiordan

@tcard
Copy link
Contributor Author

tcard commented Feb 14, 2016

There are some tests that pass when ran individually but fail when ran in bulk. Although this is introducing this bug, I think we can merge this since it is blocking all other work and we can deal with that afterwards.

@tcard tcard mentioned this pull request Feb 14, 2016
@mattheworiordan
Copy link
Member

There are some tests that pass when ran individually but fail when ran in bulk. Although this is introducing this bug, I think we can merge this since it is blocking all other work and we can deal with that afterward

Agreed, failures like this are test suite issues, not necessarily issues with the library. Perhaps merge and add an issue

@ricardopereira
Copy link
Contributor

@tcard I removed this block of code: https://github.com/ably/ably-ios/blob/5d85a840cd31d1c4d687b7bd848a86628695d18b/ablySpec/RealtimeClientConnection.swift#L469-L473. Tests are passing now https://travis-ci.org/ably/ably-ios/builds/109306828. Maybe it is something wrong with dispose.

Why didn't you use Quick? https://github.com/ably/ably-ios/blob/5d85a840cd31d1c4d687b7bd848a86628695d18b/ablySpec/ReadmeExamples.swift#L15
If you want to run only one test, it will always run all the examples first and then the test that you selected.

This is not good for debugging: https://github.com/ably/ably-ios/blob/5d85a840cd31d1c4d687b7bd848a86628695d18b/ably-ios/ARTConnection.m#L79
. E.g.: I can't step into - (__GENERIC(ARTEventListener, ItemType) *)on:(void (^)(ItemType __art_nullable))cb.

@tcard
Copy link
Contributor Author

tcard commented Feb 15, 2016

Rebased without changes.

@tcard
Copy link
Contributor Author

tcard commented Feb 15, 2016

Sorry, scratch that, there were some tests added to master that now don't compile. Fixing.

@ricardopereira
Copy link
Contributor

Well, that's a problem about how badly Quick works; we should be able to run tests individually. I didn't need all the spec boilerplate (describe/context/it) for these tests, just to run some snippets. There's no use case to describe here.

@tcard You right. Quick generates each test dynamically. That's why it sucks when you try to execute one test with the Xcode shortcut.

Hmm, why not? You should be able to. I've tried and you go directly to ARTEventEmitter on, you can't look into ARTConnection on but that's just a wrapper that calls ARTEventEmitter on.

Ok, if you say so. I didn't pay to much attention to it but it felt like it wasn't stepping into the ARTEventEmitter.

Sorry, scratch that, there were some tests added to master that now don't compile. Fixing.

Can you try clean all the warnings too?

@tcard
Copy link
Contributor Author

tcard commented Feb 15, 2016

Can you try clean all the warnings too?

Done that as well. PTAL

@ricardopereira
Copy link
Contributor

Great, thank you.
LGTM

@ricardopereira ricardopereira mentioned this pull request Feb 15, 2016
ricardopereira added a commit that referenced this pull request Feb 15, 2016
General adjustment to API spec.
@ricardopereira ricardopereira merged commit e68836c into master Feb 15, 2016
@ricardopereira ricardopereira deleted the adjust-api-spec branch February 19, 2016 08:36
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