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

Upgrade KibOChat code to make it compatible with Swift 3 #461

Closed
jekram opened this issue Dec 25, 2016 · 19 comments
Closed

Upgrade KibOChat code to make it compatible with Swift 3 #461

jekram opened this issue Dec 25, 2016 · 19 comments

Comments

@jekram
Copy link
Contributor

jekram commented Dec 25, 2016

image

Upgrade KibOChat code to make it compatible with Swift 3.

Step 1: Swift 3 is mostly backward compatible with Swift 2. Identify what changes in our code need (required vs nice to have)
Step 2: Make only the absolute required changes

Required for task #459

@sumairasaeed
Copy link
Contributor

Working on this. First used Xcode tool to auto convert our code to Swift 3. It successfully made many changes but still tool was unable to track and convert many. On build, it gave around 600 errors. I have to manually correct them. The required change for each error is minute e.g. need to remove some brackets or colons, commas etc. But as number of errors are large it is taking time. Still working on it.

@jekram
Copy link
Contributor Author

jekram commented Feb 3, 2017

OK. Let's wrap it up soon

sumairasaeed added a commit that referenced this issue Feb 4, 2017
sumairasaeed added a commit that referenced this issue Feb 6, 2017
@sumairasaeed
Copy link
Contributor

Worked on this and resolved many syntax errors, There are some errors hard to debug. This is taking time and there are more changes required. Status: There were around 600 errors and now there are around 150 left.

sumairasaeed added a commit that referenced this issue Feb 6, 2017
@sumairasaeed
Copy link
Contributor

Errors related to code are being fixed. Remaining errors left are related to SwiftyJSON and Compression library.

@jekram
Copy link
Contributor Author

jekram commented Feb 7, 2017

Thanks for the update

@sumairasaeed
Copy link
Contributor

Spent whole of time on this. Updated and integrated latest version of SwiftyJSON library. Also worked to make required changes for library in code. This needs some more work.

@sumairasaeed
Copy link
Contributor

Woked yesterday and was stuck in some errors. Later struggled and found there was a conflict between two libraries. Fixed the conflict and corrected those errors.
Some of remaining errors need syntax changes in GCD queues as syntax for GCD has changed in Swift3, some are related to for-each loop as for-loop syntax has changed in Swift 3, others are related to changes in Data types, and also need changes in code where we are doing compression.

@jekram
Copy link
Contributor Author

jekram commented Feb 9, 2017

Sumaira This is not specific enough. You have been working on this for more 1 week. This was estimated as 3 days of effort. Three days ago you told me it is 90% done and I will push the code IA today. Be very specific what was done and what is the plan for today.

@sumairasaeed
Copy link
Contributor

From table above, this issue covered two rows one was to update our own code to swift 3 and other part was to update swiftyjson to swift 3. Also, this issue covers updating compression library. In past week, firstly we updated our own code using Xcode tool. Even after that we found there were around 600 errors which needed to be corrected manually one after other. As i continued to correct errors, they reduced and 4 days ago it reduced to 150 errors.
We also started to update our SwiftyJSON and Compression libraries. Both libraries were updated successfully. After update, more errors popped up related to these libraries. Also, we encountered a conflict between two of libraries yesterday.
After every change we make, Xcode compiler does some processing and shows more errors. Also it requires a clean build after every 5-6 changes so it recompiles and show errors according to new changes. ETA quoted above came out to be incorrect as number of errors shown by compiler is not consistent. Since last days, i am continuously correcting errors which were not updated by tool and has to be done manually. There are still more errors left. The thing is that Swift 3 document or migration document of libraries show that changes are not large in number. But issue is that those syntax which is updated is used at multiple places in code so taking time to do one by one. Let me give you an example of FOR-loop as quoted above. FOR-loop is used at 150 places in code so have to go and change its format manually at those 150 places. Same is case with some others example GCD queues.
I am trying hard each day to wrap it up. Also worked whole day today to correct the errors manually and kept committing code so can be tracked. Still right now, its showing 64 errors which neeeds to be corrected manually.

@jekram
Copy link
Contributor Author

jekram commented Feb 9, 2017

What is the next step and what is the ETA to get this done? What % of the work is complete and ℅ is pending?

@sumairasaeed
Copy link
Contributor

Next step is to manually fix the errors that are being popped up by compiler. Its tough to comment on ETA or amount of work pending as compiler shows different number of errors each time we compile code after fixing errors. I can comment a rough estimate according to my analysis after looking at amount of errors already corrected around 80% work is done. Rough ETA is around 2 days. However, its possible that it gets done in 1 day, trying best to resolve maximum errors each day.

@jekram
Copy link
Contributor Author

jekram commented Feb 10, 2017

This is very poor planning. You have no idea what you are doing.

I do not understand your comment about 80%. It was 90% 3 days ago.

How many errors are pending to be fixed?

@sumairasaeed
Copy link
Contributor

At first it showed around 60 errors remaining, worked and now it shows 6 errors remaining. Will keep on updating issues pending and solved as I re-compile.

@sumairasaeed
Copy link
Contributor

On recompile, 17 more errors popped up. correcting them

@sumairasaeed
Copy link
Contributor

Worked to correct those 17 errors. On clean build, 40 errors popped up from compiler. Corrected 25 of them, 15 errors pending to be corrected

@sumairasaeed
Copy link
Contributor

After correcting those 15 errors, 35 more errors were shown by compiler, solved 26 of them. Now working to fix remaining 9 errors

@sumairasaeed
Copy link
Contributor

Finally I am able to resolve all the build errors and project has built successfully. On running app, it showed first screen but app crashed. From logs, i found an error related to new Kingfisher Image library. I am opening seperate issue for that. We can close this one.

@jekram
Copy link
Contributor Author

jekram commented Feb 10, 2017

Thanks.

Are you getting this error locally or after pushing this into TestFlight?

@jekram jekram closed this as completed Feb 10, 2017
@sumairasaeed
Copy link
Contributor

sumairasaeed commented Feb 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants