Closed lucianocheng closed 2 years ago
Thanks. Will have a look at it soon.
@burhanrashid52 ping on this?
@lucianocheng I was thinking instead of directly merging in master, we merge it in the another branch i.e kotlin-migration
, and keep merging all the Kotlin changes there.
Once all the files are migrated to Kotlin, we can release a new photoeditor library with Kotlin support Ex:
com.burhanrashid52.photoeditor-ktx-2.0.0
and keep the java library as it is.
Let me know your thoughts ?
@burhanrashid52 I'm not explicitly against it, but I'm not sure I understand the tradeoff. Kotlin/Java is interchangable and this now creates effectively a fork. Bugs will inevitably get fixed in one fork but not the other.
@burhanrashid52 I'm not explicitly against it, but I'm not sure I understand the tradeoff. Kotlin/Java is interchangable and this now creates effectively a fork. Bugs will inevitably get fixed in one fork but not the other.
Hmmm...let me review and will get back to you.
@burhanrashid52 ping.
@burhanrashid52 ping.
Sorry, have not been able to find time to review this. Will try to close this by the weekend.
@burhanrashid52 can you hand this review off to someone else? This review is now 4 weeks old.
@burhanrashid52 can you hand this review off to someone else? This review is now 4 weeks old.
Do you have anyone in mind ? Feel free to add them as reviewers. I am would be happy if someone else can review it.
I don't have reviewer-adding permissions, but @anderbytes would make sense since he's trying to convert more.
I don't have reviewer-adding permissions, but @anderbytes would make sense since he's trying to convert more.
I'd be happy to help , just need some guidance on what to do, because I have never done that before.
@lucianocheng I don't know why but I am not able to add @anderbytes as a reviewer.
@lucianocheng I don't know why but I am not able to add @anderbytes as a reviewer.
@burhanrashid52 You need to add one or both of us as outside collaborators and permission us appropriately.
@burhanrashid52 alternatively just set yourself as a reviewer and allow @anderbytes to comment. Then once we both agree you can just merge it.
@lucianocheng I don't know why but I am not able to add @anderbytes as a reviewer.
@burhanrashid52 You need to add one or both of us as outside collaborators and permission us appropriately.
I've added you as collaborators in this project.
@lucianocheng I'm not used to formal testing using JUnit or anything as such. Can you tell me the needed steps to execute this review? I want to collaborate but I lack the knowledge in this matter
@anderbytes assigned you as reviewer.
@lucianocheng I'm not used to formal testing using JUnit or anything as such. Can you tell me the needed steps to execute this review? I want to collaborate but I lack the knowledge in this matter
Yep. Since I'm not adding any functionality this one should be fast. I would recommend:
If any of 1-4 aren't clear for anything, leave a comment on the review and I will answer.
Everything seems to be running perfectly. See :
@lucianocheng after the tests conversion get updated to source code, what do you think of converting the whole library/app to Kotlin?
I want to collaborate more but I don't like Java and Kotlin is much better to work with, in my opinion.
37 Converted tests passing with no issues
👍
@lucianocheng after the tests conversion get updated to source code, what do you think of converting the whole library/app to Kotlin?
My plan is to do the app next, then the library.
However I would like @burhanrashid52 to do a release first with just this PR. This would flush out any issues with introducing Kotlin to the repository before proceeding.
Also I labeled this review as "Convert tests to Kotlin" but the automated conversion didn't quite work perfectly. It did actually take some time to deal with the edge cases. I suspect converting the app to kotlin will produce more complex edge cases. This will probably take time to address.
Lastly before getting to the library, there are some Android 6.0 MediaStore permission bugs I found in the app. Once the app is converted to Kotlin, I would like to address those before proceeding.
@anderbytes once you're ready please formally approve the review in the github UI.
@burhanrashid52 if you see no blockers I will merge shortly after approval.
@anderbytes I see you have approved the PR. Should I merge it ? @lucianocheng By release, you mean merging to master right ? or do you mean a library release ? If it's the second case I will probably wait to convert the full library in Kotlin and release it as a 2.0 version.
I guess that doing all the Kotlin conversions before releasing makes more sense.
@lucianocheng Once I tried locally the Kotlin conversion of the app+library and it wasnt that painfil, just a few tweaks, as you said.
The only "catch" I can see is that Kotlin has coroutines and probably they wont just appear from the automated conversion. So the correct async code will probably have to be coded.
I guess that doing all the Kotlin conversions before releasing makes more sense.
@lucianocheng Once I tried locally the Kotlin conversion of the app+library and it wasnt that painfil, just a few tweaks, as you said.
The only "catch" I can see is that Kotlin has coroutines and probably they wont just appear from the automated conversion. So the correct async code will probably have to be coded.
Yeah. The kotlin friendly API is something we can plan in the future. As a first step, conversion seems enough.
@lucianocheng We will track all the kotlin progress in kotlin-conversion
branch and once it's ready will release the library with 2.0 and merge it to master.
@lucianocheng Please create an issue to track other conversion in kotlin.
@lucianocheng By release, you mean merging to master right ? or do you mean a library release ? If it's the second case I will probably wait to convert the full library in Kotlin and release it as a 2.0 version. @lucianocheng We will track all the kotlin progress in kotlin-conversion branch and once it's ready will release the library with 2.0 and merge it to master.
We can do this, but this may create drift between the java and kotlin versions. Specifically, I won't be pushing my Android 6.0 fixes to Java. Once the conversion is complete, you should try to release 2.0 quickly. We shouldn't wait.
@lucianocheng Once I tried locally the Kotlin conversion of the app+library and it wasnt that painfil, just a few tweaks, as you said.
@anderbytes I believe you mentioned in the original issue (https://github.com/burhanrashid52/PhotoEditor/issues/360) that there were file provider issues. I was seeing these too. I think there will be additional subtle bugs and it will take longer than it appears to complete and get it through review. This will contribute to the drift I mentioned above, which is why I would prefer to not release it as a 2.0.
@lucianocheng Please create an issue to track other conversion in kotlin.
@burhanrashid52 lets just use #360
@lucianocheng We can merge your Android 6.0 and other bug fixes in kotlin into kotlin-conversion
branch. If migration takes a long time then I will make it a release anyway.
My main test phone is Android 8.0 so anything below that I'll let you test.
@lucianocheng did you see my latest pull request? I believe I concluded the conversion. Hopefully solved the bugs that appeared.